1.6

Floating Point Demystifier

Explore how computers represent decimal numbers using IEEE 754 single-precision floating point. Click any bit to toggle it and watch the decimal value change in real time, or type a number to see its binary representation.

Digital Logic Foundations
Presets
Decimal:
Value
1
Hex
0x3F800000
Sign (1 bit)
Exponent (8 bits)
Mantissa (23 bits)
MSB (bit 31) to LSB (bit 0) — Click any bit to toggle
Quick Values
Step-by-Step Breakdown
Sign Bit
0(-1)^0 = +1Positive
Exponent (8 bits)
Stored value: 127
Bias: 127
Actual exponent: 127 - 127 = 0
Mantissa (23 bits)
Stored bits: 0
Implicit leading 1 (normalized)
Effective significand: 1.0000000
Formula
(-1)^0 × 1.0000000 × 2^(0)
= 1.00000000
Metrics
Decimal Value
1.00000000
Hex Representation
0x3F800000
Biased Exponent
127 (actual: 0)
Type
Normalized
1.0x
IEEE 754 Single-Precision Format
S EEEEEEEE MMMMMMMMMMMMMMMMMMMMMMM
32 bits total:
  • 1 sign bit — 0 = positive, 1 = negative
  • 8 exponent bits — biased by 127 (stored = actual + 127)
  • 23 mantissa bits — fractional part with implicit leading 1
Value = (-1)^S × 1.M × 2^(E-127)
Special Values in IEEE 754
ValueExponentMantissaSign
+000000000All 0s0
-000000000All 0s1
+Inf11111111All 0s0
-Inf11111111All 0s1
NaN11111111Non-zeroAny
Denorm00000000Non-zeroAny
Precision: Float32 has about 7 decimal digits of precision. Numbers like 0.1 cannot be exactly represented because they have infinite binary expansions (like 1/3 in decimal).
Float32 Range & Properties
Smallest Positive Normal
1.175 × 10^-38
Largest Finite
3.403 × 10^38
Machine Epsilon
1.192 × 10^-7
Decimal Precision
~7.2 digits