09-28-2012 11:46 AM - edited 09-28-2012 11:49 AM
I have some hardware that returns data in the format shown in the picture. What I, for some reason, can't wrap my head around is why scaling by a power of 2^-4 returns the correct value. Why does taking an entire number and doing x*2^-4 produce the same value as doing it on a bit-by-bit conversion (for example if I had done bit0 * 2^-4 + bit1 * 2^-3...)
Solved! Go to Solution.
09-28-2012 11:50 AM - edited 09-28-2012 11:57 AM
What picture? [edit} Oh Like that.
You are adding a larger value with each bit by 1 order of magnatude (Base2) so, you get the same "Place Value" for each digit either way
09-28-2012 12:13 PM - edited 09-28-2012 12:24 PM
@JÞB wrote:
What picture? [edit} Oh Like that.
You are adding a larger value with each bit by 1 order of magnatude (Base2) so, you get the same "Place Value" for each digit either way
Doh, it's like writing something in scientific notation in base 10. You are shifting the decimal around, then multiplying by some power of 10 to represent the same number by compensating for the shift. Same concept applies here using power of 2 because you are in base 2. They are shifting the decimal 4 to the right, so that the right-most place value represents not 2^0 but 2^-4. So, you have to multiply by 2^-4 to shift it back.