function outData = 2CtoDec(inData)

Vref = 2.5;
LSB = Vref / (2^23 - 1);
ind = find(inData > hex2dec('7FFFFF'));

inData(ind) = bitcmp(inData(ind));
inData(ind) = bitand(hex2dec('00FFFFFF'), inData(ind));
inData(ind) = -1 * (inData(ind) + 1;)

outData = double( LSB * double(inData));

