▲ Floating Point & Normalisation

A complete interactive guide to binary floating point representation for A-Level Computer Science. Covers the full specification with worked examples, an interactive converter, and 50 exam-style exercises.

✓ A-Level ✓ Representation ✓ Normalisation ✓ Precision & Range ✓ Overflow & Underflow
Colour key: SSign / Mantissa MMantissa bits EExponent bits

🆕 1. What is Floating Point?

Floating point is a way of representing real numbers (including decimals and very large/very small numbers) in binary. Unlike fixed-point, the binary point can "float" - meaning the same number of bits can represent both very large and very small values.

A floating point number has three parts, stored as a single binary string:

S
Sign
M
Mantissa
M
Mantissa
M
Mantissa
E
Exponent
E
Exponent
E
Exponent
E
Exponent

Example: 8-bit format - 4-bit mantissa (including sign) + 4-bit exponent

The value is calculated as: value = mantissa × 2exponent

The mantissa (also called the significand) is stored as a two's complement binary fraction. The binary point sits immediately after the sign bit, so the mantissa represents a number in the range −1 to +0.something.

The exponent is stored as a two's complement integer and tells you how many places to shift the binary point left or right.

Exam format

Exam questions typically specify the number of mantissa bits and exponent bits. The mantissa includes the sign bit as its leftmost bit. Both mantissa and exponent use two's complement.

📈 2. Reading the Mantissa

The mantissa is a two's complement binary fraction. The binary point is placed after the sign (leftmost) bit.

For a 4-bit mantissa b₀ b₁ b₂ b₃, the value is:

value = −b₀ + b₁×2−1 + b₂×2−2 + b₃×2−3

So the binary point sits between b₀ and b₁, giving: b₀ . b₁ b₂ b₃

Bit patternRepresentationCalculationValue
0 1 0 00 . 1 0 00 + 0.5+0.5
0 1 1 00 . 1 1 00 + 0.5 + 0.25+0.75
0 1 1 10 . 1 1 10 + 0.5 + 0.25 + 0.125+0.875
1 0 0 01 . 0 0 0−1 + 0−1.0
1 0 1 01 . 0 1 0−1 + 0 + 0.25−0.75
1 0 1 11 . 0 1 1−1 + 0 + 0.25 + 0.125−0.625

Notice: the maximum positive mantissa (4-bit) is +0.875 and the minimum is −1.0.

📈 3. Reading the Exponent

The exponent is a two's complement integer - it works exactly like a regular two's complement number. It tells you how far to shift the binary point.

4-bit exponentTwo's complement valueEffect
0111+7shift binary point 7 places right
0010+2shift binary point 2 places right (×4)
00000no shift (×1)
1111−1shift binary point 1 place left (×0.5)
1110−2shift binary point 2 places left (×0.25)
1000−8shift binary point 8 places left
Remember

A 4-bit two's complement exponent has range −8 to +7. A 5-bit exponent has range −16 to +15. The most negative value has a 1 followed by all 0s.

4. Worked Example: Reading a Floating Point Number

Let's decode 0101 0010 (4-bit mantissa + 4-bit exponent):

0
b₀
1
b₁
0
b₂
1
b₃
0
e₀
0
e₁
1
e₂
0
e₃
  • Step 1 - Read the mantissaBits: 0101 → representation: 0.101
    Value: 0 + 0.5 + 0 + 0.125 = +0.625
  • Step 2 - Read the exponentBits: 0010 → two's complement = +2
  • Step 3 - Calculate the valuevalue = mantissa × 2exponent = 0.625 × 2² = 0.625 × 4 = 2.5

So 0101 0010 represents 2.5.


Now decode 1010 0000:

  • Step 1 - Mantissa1010 → 1.010 = −1 + 0 + 0.25 = −0.75
  • Step 2 - Exponent0000 = 0
  • Step 3 - Value−0.75 × 2⁰ = −0.75

🎯 5. Normalisation

A floating point number is normalised when the mantissa is as large as possible for the given number - this maximises precision.

✓ Normalised Positive Numbers

The mantissa must start 0.1... - the sign bit is 0 and the first fractional bit is 1.

✓ Normalised Negative Numbers

The mantissa must start 1.0... - the sign bit is 1 and the first fractional bit is 0.

If a number is not normalised, you can normalise it by:

  • Shift the mantissa LEFT (arithmetic left shift - but the sign bit stays the same) and decrease the exponent by the same amount. Repeat until the normalisation condition is met.

Why does this work? Shifting the mantissa left multiplies it by 2, and decreasing the exponent by 1 divides the whole number by 2 - so the value stays the same.

Why normalise?

Normalisation ensures there is only one unique binary representation for each number, and that the mantissa uses all available bits - giving maximum precision.


Example: Normalise 0010 0001 (4-bit mantissa + 4-bit exponent)

  • Read it0010 (mantissa) → 0.010. Starts with 0.0 - NOT normalised (positive needs 0.1).
  • Shift left ×1Mantissa becomes 0.100, exponent decreases from 1 to 0.
  • Check0.1 - starts with 0.1 ✓ NORMALISED. Result: 0100 0000.

6. Converting Decimal to Floating Point

To convert a decimal to floating point binary:

  • Step 1 - Convert to binary fractionConvert the whole number and fractional parts to binary separately.
  • Step 2 - Write in binary scientific notationMove the binary point to get a normalised mantissa (0.1... for positive, 1.0... for negative).
  • Step 3 - Find the exponentThe exponent = number of places you moved the binary point (positive = moved right, negative = moved left).
  • Step 4 - Encode mantissa in two's complementTruncate or pad the mantissa to fit the available bits.
  • Step 5 - Encode exponent in two's complementConvert the exponent integer to two's complement with the available exponent bits.

Example: Convert 3.0 to 8-bit floating point (4-bit mantissa + 4-bit exponent).

  • Binary3 = 11 in binary = 11.0
  • Normalise11.0 = 0.11 × 2² (moved point left 2 places → exponent = +2)
  • Mantissa0.11 fits in 4 bits as 0110 (0 . 1 1 0)
  • Exponent+2 in 4-bit two's complement = 0010
  • Result0110 0010

Example: Convert −0.5 to 8-bit (4+4).

  • Binary−0.5 = −0.1
  • Normalise (negative)Need 1.0... form. −0.5 = −1 × 2⁻¹. Mantissa = −1 = 1000, exponent = −1.
  • Exponent−1 in 4-bit two's complement = 1111
  • Result1000 1111

7. Precision and Range

More Mantissa Bits

→ Greater precision (more fractional detail, smaller gaps between representable numbers).

More Exponent Bits

→ Greater range (can represent larger and smaller numbers).

There is always a trade-off: with a fixed total number of bits, allocating more bits to the mantissa means fewer for the exponent, and vice versa.

FormatMantissa bitsExponent bitsMax valuePrecision
8-bit440.875 × 2⁷ = 1120.125 (1/8)
12-bit84≈0.9921 × 2⁷ ≈ 1270.0078125 (1/128)
12-bit480.875 × 2¹²⁷ ≈ huge0.125 (1/8)
Rounding Errors

Not all decimal numbers can be represented exactly in binary floating point. For example, 0.1 in decimal is a repeating fraction in binary (0.000110011...). Truncating this causes a rounding error. This is an inherent limitation of binary floating point.

8. Overflow and Underflow

Overflow

Occurs when a number is too large to be stored - the exponent needed exceeds the maximum value the exponent bits can hold. In an 8-bit system (4M + 4E), the max exponent is +7, so any number requiring exponent > 7 causes overflow.

Underflow

Occurs when a number is too small (too close to zero) to be stored - the exponent needed is below the minimum representable value. In an 8-bit system (4M + 4E), the min exponent is −8, so values requiring exponent < −8 cause underflow.

ConditionWhat happensExample (4+4 system)
OverflowNumber > max representableResult > 112 (max = 0.875 × 2⁷)
UnderflowNumber too close to zeroResult < 0.5 × 2⁻⁸ = 0.00195...
RoundingPrecision loss in mantissa0.1 → stored as approx value

→ Decimal → Floating Point

Mantissa bits: Exponent bits:
Enter a decimal number and click Convert.

← Floating Point → Decimal

Mantissa bits: Exponent bits:
Enter a binary floating point string and click Convert.
Try these examples (4-bit mantissa + 4-bit exponent):
Interactive Normalisation Tool

Enter a binary floating point number. The tool will check whether it is normalised and show you the step-by-step normalisation process.

Binary string:
Mantissa bits:
Exponent bits:
Try these (4-bit mantissa + 4-bit exponent):
50 Exam-Style Exercises
0 / 50 completed
Filter: Difficulty:
Worksheet & Solutions

Floating Point Conversions: 200 Questions

200 exam-style conversion questions with a full solutions booklet showing complete worked answers. Covers fixed point (4.4 format), floating point 8+4 bit, and floating point 10+6 bit, all using two's complement, matching the A-Level specification exactly.

  • ✓ 200 graded practice questions across 3 formats
  • ✓ Full worked solutions with every step shown
  • ✓ Place value tables, bit-by-bit working
  • ✓ Two separate PDFs (questions + solutions)
£2

One-time payment • Delivered by email • No account needed