Meaning and conditions
This article treats the 32-bit binary format binary32. Its field decoder expects s∈{0,1},E∈{0,…,255},F∈{0,…,8388607}. A separate mode rounds an already parsed finite binary64 value to binary32; it is not general exact-decimal arithmetic.[1][2]
Normal binary32 value.[1]
Subnormal value or signed zero.[1]
E=255 represents infinity when F=0 and NaN when F≠0. These patterns must not be substituted into the normal-number formula.[1]
Step-by-step reasoning
A normal positive binary value is normalized to 1.f. The implicit 1 saves a stored bit, while E−127 sets the scale interval. Subnormal values omit that 1 and fill the near-zero region with constant absolute spacing. The fields therefore define a finite set of representable values.[1]
Format conversion selects a destination from this finite set. Under roundTiesToEven it chooses the nearest value, using an even least significand bit for exact ties. A later decimal display can be rounded without changing stored bits.[1][2]
Three bit fields for exact 0.15625
Three bit fields for exact 0.15625
Free with a Quanta account. Your download stays ready after registration.
Two fully worked original examples
Encode a finite binary fraction exactly
- Given
- x=0.15625=5/32; binary32 has 1 sign,8 exponent and 23 fraction bits.
- Find
- Find the three fields and decode back.
Normalize the binary fraction.
Add bias 127 to the actual exponent.
The leading 1 bit is implicit; fraction storage contains only the fractional part.
Substitute fields into the normal decoding formula.
Result: Bit pattern 0x3e200000 represents 0.15625 exactly. No rounding is needed.
Check: Field boundaries:0|01111100|01000000000000000000000. Decoding returns exactly 5/32.
Two halfway cases when rounding to binary32
- Given
- Source values x1=1+2^−24 and x2=1+3·2^−24 are exactly representable in binary64. Just above 1, one binary32 ULP is 2^−23.
- Find
- Round both using roundTiesToEven.
The first value is midway between fraction fields 0 and 1.
The even least significand bit selects fraction 0.
The second lies between fraction fields 1 and 2.
This time even fraction 2 selects the upper neighbor.
Result: x1 rounds down to 1, x2 up to 1+2^−22≈1.000000238418579. Both absolute errors equal 2^−24.
Check: Bit patterns are 0x3f800000 and 0x3f800002. Both have an even fraction field; “always round down” would be wrong.
Recall the method later with the formula’s flashcards.
11 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five exercises with solutions
Calculate · Foundation
Decode s=1,E=127,F=4194304 as binary32.
Show hint
F/223=1/2 and E−127=0.
Learning goal: Decode sign, bias and fraction together.
Rearrange · Application
A positive normal number has E=127 and value 1.25. Find F.
Show hint
Solve 1+F/223=1.25.
Learning goal: Recover a fraction field from an exactly representable value.
Interpret · Application
Compare E=0,F=1 with E=1,F=0 for s=0.
Show hint
Exponent field 0 removes the implicit 1.
Learning goal: Distinguish subnormal values from the normal threshold.
Error analysis · Application
Someone decodes E=0,F=0,s=1 using the normal formula and obtains −2^−127. Correct this.
Show hint
Exponent field 0 uses a separate rule.
Learning goal: Detect an incorrect implicit 1 in a special case.
Transfer · Application
E=255,F=0 and E=255,F=1 are entered as normal numbers. What should a correct presentation show instead?
Show hint
The exponent field consists entirely of ones.
Learning goal: Report bit-pattern classes rather than invented finite values.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Model limits and next steps
The decoder is exact for the specified fields. The converter instead starts from the already parsed binary64 value; arbitrary decimal input before that step is not certified exact. For tiny sources, correct rounding can produce binary32 zero.[1][2]
Two’s complement explains signed integers. Exponent laws explain bit weights; condition numbers describe another source of numerical sensitivity.
Sources for this explanation
Quanta · Updated November 9, 2026
- Oracle Numerical Computation Guide: IEEE Arithmetic — Chapter2: IEEE Arithmetic Model; Single Format; Table2-2; Rounding directions
- Python Tutorial: Floating-Point Arithmetic, Issues and Limitations — §15, binary fractions; representation of0.1; display rounding
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Created a DE/EN author draft with a bounded model, original graphic, two examples and varied solved exercises.
Cite this reference page
Quanta. IEEE 754 floating-point representation and rounding. Updated November 9, 2026. https://quanta-study.de/en/formula-sheet/ieee-754-gleitkomma
When citing a specific scientific statement, also cite the specialist source linked to that statement.