IEEE 754 Float Inspector
Split a float into sign, exponent and mantissa, or decode a bit pattern back to a number. Single and double precision.
Breakdown
01000000010010001111010111000011
4048f5c3
- Sign
- 0(+)
- Exponent bits
- 10000000
- Mantissa bits
- 10010001111010111000011
- Unbiased exponent
- 1
- Significand
- 1.5700000524520874
- Kind
- Normal
- Decoded value
- 3.140000104904175
Single precision is 1 sign + 8 exponent + 23 mantissa bits; double is 1 + 11 + 52. The mantissa has an implicit leading 1, which is why single precision carries 24 significant bits.
When the exponent bits are all zero the number is subnormal: the implicit leading 1 becomes 0 and the exponent is read as 1-bias. This gives a smooth ramp to zero instead of a jump between the smallest normal number and zero.
0.1 is a repeating fraction in binary and does not fit exactly, so decoding gives 0.100000001490116. That is float arithmetic, not a bug in the tool.
Comments
No comments yet — be the first to say something