Floating Point Representation Simulator
Store numbers as a two's complement mantissa and exponent, normalise them and see rounding errors, plus IEEE 754 32-bit and 64-bit.
Format
Value = mantissa × 2^exponent. Both are two's complement; the mantissa has an implied binary point after its first (sign) bit.
Denary → floating point
- 1. 5.75 = 0.71875 × 2^3
- 2. Mantissa 0.71875 → 0.1011100
- 3. Exponent 3 → 0011
Mantissa
Exponent
Floating point → denary
Click bits to change them.
Mantissa (0.1011100)
Exponent (3)
0.71875 × 2^3 = 5.75
About This Simulation
This floating point simulator shows how real numbers are stored as a mantissa and an exponent. In the A Level format both are two's complement: convert denary numbers, normalise binary values step by step and see the rounding error. A second mode shows IEEE 754 single precision as used by real computers.
Features
- Mantissa from 2 to 16 bits and exponent from 2 to 8 bits
- Denary to floating point with each step and the rounding error
- Clickable mantissa and exponent bits with place values
- Normalisation check and step-by-step normalising
- Range and precision for the chosen format
- IEEE 754 32-bit and 64-bit: sign, biased exponent, fraction and the exact stored value
Topics covered
- Floating Point Representation
- Mantissa and Exponent
- Normalisation
- Precision vs Range
- Rounding Errors
- IEEE 754
Explanation
Floating point stores a number as mantissa × 2^exponent, like scientific notation in binary. The mantissa holds the significant digits and the exponent says where the binary point goes. In the Cambridge A Level format, the mantissa is a two's complement fraction with the binary point after the sign bit, and the exponent is a two's complement integer.
How it works
- Mantissa place values are −1, ½, ¼, ⅛, …, so 0.1011 means ½ + ⅛ + 1⁄16 = 0.6875.
- Value = mantissa × 2^exponent. With mantissa 0.1011100 and exponent 3, the value is 0.71875 × 8 = 5.75.
- A normalised mantissa starts with 01 (positive) or 10 (negative), so no bits are wasted on leading zeros or ones.
- To normalise, shift the mantissa left until the first two bits differ, subtracting 1 from the exponent for each shift.
- More mantissa bits give greater precision; more exponent bits give a greater range. Numbers that need more bits than the mantissa has are rounded, giving a rounding error.
Why it matters
Floating point representation and normalisation are A Level (9618 Paper 3) topics. Understanding rounding errors explains why 0.1 + 0.2 is not exactly 0.3 in most programming languages and why money should not be stored as floating point.
Frequently Asked Questions
Why are floating point numbers normalised?
Normalisation gives the most precision for a given number of mantissa bits and ensures each number has only one representation.
How do you tell if a mantissa is normalised?
A positive normalised mantissa starts 0.1 and a negative one starts 1.0: the first two bits are different.
What is the trade-off between mantissa and exponent bits?
With a fixed total, more mantissa bits increase precision but reduce range, and more exponent bits increase range but reduce precision.
Why can't 0.1 be stored exactly?
0.1 has an infinitely repeating binary fraction (0.000110011…), so it must be cut off and rounded to fit the mantissa.
Related Simulations
Number Systems
Two's Complement Simulator
Convert between denary and two's complement binary, with the invert-and-add-one steps and the negative place value shown.
Number Systems
Bitwise Operations Simulator
Apply AND, OR, XOR, NOT, logical and arithmetic shifts and rotations to 8-bit values, and use masks to set, clear and test bits.
Number Systems
Number System Converter
Convert between binary, decimal, hex, octal
Number Systems
BCD Representation Simulator
Store each denary digit as a 4-bit nibble, compare BCD with pure binary and add BCD numbers with the +6 correction.

