Reading IEEE 754 bit patterns
Split the pattern into sign, exponent and mantissa. The value is then (−1)^s · 1.m · 2^(e − 127).
Rules
- Hex to binary, then split 1 + 8 + 23 bits
- e − 127 gives the exponent
- Value = (−1)^s · 1.m · 2^e
Your turn
Three problems on this topic. Spaces don’t matter.
- 1 · Reading IEEE 754
- 2
- 3
What decimal value does this IEEE 754 bit pattern (32 bits) have?
0x42660000
Decimal value
Type numbers without a prefix, spaces don’t matter. With a fixed bit width give all the bits.
Worked example
What decimal value does this IEEE 754 bit pattern (32 bits) have?
0x4339E000
Worked solution
- 1Binary: 0 10000110 01110011110000000000000
- 2Exponent: 134 − 127 = 7
- 3Value: 1.mantissa · 2⁷ = 185.875
Typical mistake: Add the leading 1 before the point, it is not in the bit pattern.
Common questions
What is the bias?
A fixed offset of 127 so the exponent can be stored without a sign.
