Hello,
I’m trying to convert a 4-byte IEEE 745 floating point in an little-endian machine
(Intel) back into a format readable by humans. According to a little conversion program, the bit pattern (in hex):
80BEBF39 (with 80 at the lowest address)
corresponds to:
3.6572292e-04
I just can’t seem to get that result when I convert by hand. I start by converting
the number back to big-endian (39BFBE80); then convert that to binary
(111001101111111011111010000000); and then isolate the fractional
part of the number, bits 9-31, (101111111011111010000000); and then
doing a reverse two’s complement by inverting all bits and adding 1
(10000000100000110000000); and finally convert that number back to
decimal (4211072). As you can see, what I get is different from what
I’m expecting (36572292). Any programmers out there can help me?