VL
Initializing Lab Environment...

IEEE-754 Floating Point (32-Bit)

IEEE-754 Floating Point (32-Bit) Sandbox
Sign (1)0
Exponent (8)01111011
Mantissa (23)10011001100110011001101
Exact Stored Float320.100000001
32-Bit Hex0x3DCCCCCD

Quick Float Examples

Rounding Error1.49e-9

Parameters

-5050

IEEE-754 Floating Point (32-Bit)

FLOAT32

Computers store decimal numbers like 0.1 or โˆ’12.5 in scientific binary notation: 1 Sign bit, 8 Exponent bits, and 23 Mantissa bits. That is why 0.1 + 0.2 !== 0.3 in almost every programming language!

(โˆ’1)Sร—(1.Mantissa)ร—2Eโˆ’127(-1)^S \times (1.\text{Mantissa}) \times 2^{E - 127}

Whiteboard Solver Steps

Step 1

1. IEEE-754 32-Bit Float Layout

1 Sign bit + 8 Exponent bits (bias 127) + 23 Mantissa fraction bits store huge & tiny numbers in 4 bytes.

(โˆ’1)0ร—(1.mantissa)ร—2โˆ’4(-1)^{0} \times (1.\text{mantissa}) \times 2^{-4}
Step 2

2. Why Floating-Point Rounding Happens

Numbers like `0.1` repeat infinitely in base-2 binary, so 23 mantissa bits round to the nearest representable float!

Stored=0.10000000,Error=1.49eโˆ’9\text{Stored} = 0.10000000, \quad \text{Error} = 1.49e-9