ConceptStep · learning platform for computer science

IEEE 754 single precision

Number systems · Lesson

← ConceptStep

IEEE 754 — single precision (32 bit)

A 32-bit floating-point number is divided into 1 sign bit, 8 exponent bits and 23 fraction bits.

The structure

S
1
Exponent
8 bit
Fraction
23 bit

For normalized numbers: (−1)S × 1,fraction × 2E−127. The value 127 is the bias.

Example: 5.75

5.75₁₀ = 101.11₂ = 1.0111₂ × 2²

Sign: 0. Unbiased exponent: 2. Stored exponent: 2 + 127 = 129 → 10000001.

The leading 1 of a normalized value is implicit; only the fractional part is stored:

01110000000000000000000

Result: 0 10000001 01110000000000000000000

Practice

Progress: 0/5 — correct: 0.

Encode 0.5 in IEEE 754 single precision.

Sign: 0. Write |0.5| in binary, normalize it as 1.f × 2ᵉ, then store e+127 on 8 bits. For this exercise the stored exponent is 01111110.

Special values

E = 00000000: zero or subnormal numbers. E = 11111111: infinity if the fraction is zero, NaN if the fraction is non-zero.

Your competency map

What you need to know for IEEE 754 — encoding

ConceptStep separates what is required from what is recommended or useful as reinforcement. Only required prerequisites block your progress.

Current topic Strong skill Review due Needs reinforcement To be mastered Optional support

Relationships: solid line = required · dashed line = recommended · dotted line = reinforcement.

GUIDED LEARNING PATHS

Want to choose the next skill to develop?