IEEE 754 Float Bit Explorer
Type any number and see its exact 32-bit or 64-bit IEEE 754 representation. Click any bit to flip it and watch the value change — the cleanest way to understand sign, exponent, mantissa, and why 0.1 + 0.2 ≠ 0.3.
Precision
Computed value
0.1
Type
Normal
Sign
0 → +
Exponent (stored)
1019 (01111111011)
Exponent (unbiased)
-4
Hex
0x3FB999999999999A
Quick examples
How a float is stored
An IEEE 754 number is just scientific notation in binary. The bits are split into three sections:
- Sign (1 bit): 0 = positive, 1 = negative.
- Exponent (8 or 11 bits): stored with a bias (127 for 32-bit, 1023 for 64-bit) so it can represent both very small and very large numbers without a separate sign bit.
- Mantissa / fraction (23 or 52 bits): the significant digits, with an implicit leading 1 for normal numbers.
Special values
| Pattern | Meaning |
|---|---|
| exp = 0, frac = 0 | Zero (+0 or −0 depending on sign). |
| exp = 0, frac ≠ 0 | Subnormal — fills the gap near zero with reduced precision. |
| exp = all 1s, frac = 0 | ±Infinity (typically from overflow or 1/0). |
| exp = all 1s, frac ≠ 0 | NaN — "not a number", propagates through arithmetic. |
Why 0.1 + 0.2 ≠ 0.3
0.1 in binary is a repeating fraction: 0.0001100110011001100… It can't be stored exactly in 52 mantissa bits, so the CPU keeps the closest representable number. The same happens with 0.2. When you add them you're adding two slightly-off binaries — and the result lands a tiny step above the closest representation of 0.3.
Click the 0.1 + 0.2 example to see the actual stored bits — the last digits of the value 0.30000000000000004 are baked into the mantissa pattern.
Things to try
- Toggle the sign bit on any value to flip its sign without changing the magnitude.
- Click the last mantissa bit of 1.0 — the result is 1 + 2−52, the smallest representable number above 1.
- Set exponent = all 1s, frac = 0 manually to construct Infinity.
- Switch 32-bit ↔ 64-bit with the same value — you'll see the bit pattern grow and the rounding error shrink.