3 ms·
0.921875 is 921875/10^6 = 59/64, which is exactly representable in binary since 64 (2^6) is a power of two. So 1.921875 * 2^6 = 1 59/64 * 64 = 64 + 59 = 123. O
by RickRegan 14y ago
0.921875 is 921875/10^6 = 59/64, which is exactly representable in binary since 64 (2^6) is a power of two. So 1.921875 * 2^6 = 1 59/64 * 64 = 64 + 59 = 123.
Or as acqq pointed out, the bit representations are the same: 1.921875 = 1.111011 (using my converter at http://www.exploringbinary.com/binary-converter/ http://www.exploringbinary.com/binary-converter/ ), which is 123 (1111011) shifted right 6 bits.