All subjects · Computer Science · WCP03 Advanced Principles of Computer Science
Floating point: the IEEE 754 half precision format
Edexcel IAL Computer Science · WCP03 Advanced Principles of Computer Science
Fixed-point binary cannot hold very large and very small numbers at the same time. Floating point solves this, just like scientific notation in denary. Unit 3 uses the IEEE 754 16-bit half precision format.
The idea
Scientific notation writes 3 450 000 as 3.45 x 106: a significand (3.45) and an exponent (6). Binary floating point does the same with powers of 2: 101.11 = 1.0111 x 22.
A number is normalised when the binary point sits just after the first 1. Every non-zero normalised binary number starts '1.', so IEEE 754 does not store that 1: it is the hidden (implicit) bit, giving one extra bit of precision for free.
The 16-bit half precision layout
IEEE 754 half precision uses 16 bits:
- 1 sign bit: 0 = positive, 1 = negative.
- 5-bit biased exponent: stored exponent = true exponent + 15 (the bias). Stored values run 00000 to 11111.
- 10-bit significand (fraction): the bits after the binary point of the normalised number.
Value = (-1)sign x 1.significand x 2^(stored exponent - 15).
| Sign | Exponent (5 bits, bias 15) | Significand (10 bits) |
|---|---|---|
| 0 | 10001 | 0111000000 |
5.75 = 1.0111 x 22: exponent 2 + 15 = 17 = 10001
Special patterns
- Exponent 00000 with significand 0 means zero (+0 or -0). With a non-zero significand it means a tiny subnormal number with no hidden 1.
- Exponent 11111 with significand 0 means infinity; with a non-zero significand it means NaN (not a number, for example 0/0).
- So normal numbers use stored exponents 1 to 30: true exponents -14 to +15.
- Largest value: 1.1111111111 x 215 = 65 504. Smallest positive normal value: 2-14 (about 0.000061).
Benefits and drawbacks
Benefits: a huge range from a small number of bits; numbers of very different sizes in one format; a standard used by all modern hardware, so results match across machines.
Drawbacks: only 11 significant bits (about 3 to 4 denary digits) of precision in half precision; many denary fractions such as 0.1 cannot be stored exactly (rounding errors build up in repeated calculations); arithmetic is slower and more complex than integer arithmetic; testing two floats for exact equality is unreliable.
Trade-off: more exponent bits give more range; more significand bits give more precision. Half precision suits graphics and machine learning, where speed and memory matter more than precision.
Worked example
Write 5.75 in IEEE 754 half precision.
- Sign: positive, so 0.
- 5.75 = 4 + 1 + 0.5 + 0.25 = 101.11 in binary.
- Normalise: 101.11 = 1.0111 x 22.
- Exponent: 2 + 15 = 17 = 10001.
- Significand: the bits after the point, 0111, padded to 10 bits: 0111000000.
Answer: 0 10001 0111000000
Check yourself
- What is the exponent bias in IEEE 754 half precision?
Show answer
15. Bias = 25 - 1 - 1 = 15.
- A normalised number is 1.101 x 24. What denary value is stored in the 5-bit exponent field?
Show answer
19. Stored = true exponent + bias = 4 + 15 = 19 (10011).
- The stored exponent field is 01100. What is the true exponent?
Show answer
-3. 01100 = 12; 12 - 15 = -3.
- Why is the leading 1 of the significand not stored?
- It is stored in the sign bit instead
- Every normalised non-zero number starts with 1, so storing it would waste a bit
- It is always 0
- It is stored in the exponent
Show answer
Every normalised non-zero number starts with 1, so storing it would waste a bit. The hidden bit gives an extra bit of precision.
- Which bit pattern starts a negative half precision number?
- A sign bit of 0
- An exponent of 11111
- A significand of all 1s
- A sign bit of 1
Show answer
A sign bit of 1. The first bit is the sign: 1 for negative.
- What is the largest finite value in IEEE 754 half precision?
Show answer
65504. Exponent 11110 = 30, true exponent 15; significand all 1s: (2 - 2-10) x 215 = 65504.
- A format moves one bit from the significand to the exponent. What is the effect?
- Greater precision but less range
- Greater range and greater precision
- No change in range or precision
- Greater range but less precision
Show answer
Greater range but less precision. Exponent bits set range; significand bits set precision.
- Why can 0.1 not be stored exactly in binary floating point?
- 0.1 is too large for the exponent
- Floating point cannot store numbers below 1
- 0.1 is a recurring fraction in binary, so it must be rounded to the nearest representable value
- 0.1 needs a negative sign bit
Show answer
0.1 is a recurring fraction in binary, so it must be rounded to the nearest representable value. 0.1 = 0.000110011... in binary; half precision stores 0.0999755859375.
Sources
- Pearson Edexcel International Advanced Subsidiary and Advanced Level in Computer Science specification (2026), Issue 1
- Pearson Edexcel IAL Computer Science sample assessment materials (Unit 3 paper, resource booklet and mark scheme)
- Wikipedia: Half-precision floating-point format
Last updated 8 November 2026. Spotted a mistake? Tell us.