A normalised floating-point number wastes no bits on leading zeros or ones, so it is as precise as the format allows and has only one representation. Then see how the split between mantissa and exponent trades range for precision, and why some numbers can only ever be approximated.
A floating-point number is normalised when the first two bits of the mantissa are different: a positive mantissa starts 0.1 and a negative one starts 1.0. To normalise, shift the mantissa left until this is true and subtract the number of places shifted from the exponent, so the value is unchanged. Normalisation gives the maximum precision for the number of mantissa bits and a unique representation for each number. For a fixed total, more mantissa bits give greater precision and more exponent bits give a greater range. Many denary fractions, such as 0.1, recur in binary and can only be stored as an approximation, causing rounding errors; a result too large for the exponent causes overflow, and one too close to zero causes underflow.
Leading 0s on a positive mantissa (or leading 1s on a negative one) carry no information: they just take up bits that could hold significant digits. Normalising removes them.
Test: positive normalised mantissas start 01; negative normalised mantissas start 10. Starting 00 or 11 means not normalised.
Method: shift the mantissa left one place at a time, filling with 0 on the right, until the first two bits differ. Count the shifts.
Exponent: subtract the number of shifts (each left shift doubles the mantissa, so the exponent must drop by 1 to compensate).
Reasons: the most significant bits are kept, so precision is as high as possible; each number has exactly one representation, which makes comparing values simpler.
Worked example Positive mantissa
Normalise 00011010 0101 (8-bit mantissa, 4-bit exponent, both two's complement).
The mantissa starts 00, so it is not normalised.
Shift left until it starts 01: 00011010 → 00110100 → 01101000, which is 2 places.
Normalise 00110000 0010 and give its denary value.
Shift left once: 01100000, exponent 2 − 1 = 1 = 0001. Value 0.75 × 2 = 1.5 (the same as before: 0.375 × 4).
Examiner trap
Shifting the mantissa without changing the exponent changes the number. Every left shift must take 1 off the exponent; state the new exponent in binary.
Section 02
Range versus precision.
With a fixed number of bits, the split between mantissa and exponent is a trade-off. The exponent decides how far the point can move (range); the mantissa decides how many significant bits are kept (precision).
12 bits split as
Largest positive
Smallest positive (normalised)
Effect
10-bit mantissa, 2-bit exponent
1.99609375
0.125
high precision, tiny range
8-bit mantissa, 4-bit exponent
127
1/512 = 0.001953125
a balance
6-bit mantissa, 6-bit exponent
2 080 374 784
2−33, about 1.16 × 10−10
huge range, only 5 significant bits
Worked example Extremes of a format
For an 8-bit mantissa and a 4-bit exponent, both two's complement, give the largest positive number, the smallest positive normalised number and the most negative number, in binary and denary.
Largest positive: biggest mantissa 01111111 (= 127/128) with biggest exponent 0111 (= 7): 127/128 × 128 = 127.
Smallest positive normalised: smallest normalised positive mantissa 01000000 (= ½) with most negative exponent 1000 (= −8): ½ × 2−8 = 1/512.
Most negative: mantissa 10000000 (= −1) with exponent 0111: −1 × 128 = −128.
Note the smallest positive must still be normalised, so the mantissa cannot be 00000001.
A system changes from an 8-bit mantissa and 4-bit exponent to a 6-bit mantissa and 6-bit exponent. State the effect on range and on precision.
The range increases (exponent up to +31 instead of +7, so far larger and smaller numbers fit), but the precision decreases (only 6 mantissa bits, so fewer significant bits and larger gaps between neighbouring values).
Stage 1 · Learn
Check what the sim just showed you
Four quick checks. Each correct answer earns XP and records this skill on your profile.
Quick check+10 XP
Which 8-bit mantissa is normalised?
Quick check+10 XP
Normalising 00011010 0101 gives which result?
Quick check+10 XP
The total bits stay the same but more are given to the mantissa. What is the effect?
Quick check+10 XP
Why can 0.1 not be stored exactly in binary floating point?
Section 03
Approximations, overflow and underflow.
Just as 1/3 cannot be written exactly in denary, many fractions recur forever in binary. A fixed-size mantissa must cut them off, so the stored value is only close to the real number.
Example: 0.1 in binary is 0.000110011001100... recurring = 0.11001100... × 2−3. With 8 bits the mantissa is 01100110 and the exponent 1101.
Stored value: 102/128 × 2−3 = 0.099609375, a rounding error of 0.000390625.
Consequences: errors build up when a value is used in many calculations (adding 0.1 ten times may not give exactly 1), and testing two REAL values for equality can fail; compare against a small tolerance instead.
Overflow: a result is too large to be represented because the exponent would exceed its maximum. With 8 + 4 bits, 96 (01100000 0111) doubled is 192, above the largest value 127.
Underflow: a result is too close to zero to be represented because the exponent would go below its minimum. Halving 1/512 (01000000 1000) needs an exponent of −9 in normalised form, so it is stored as 0.
Examiner trap
Overflow and underflow are about the size of the result, not about a negative number. Underflow means too close to zero, not "too negative".
Stage 2 · Exam
Exam-style questions
Unlocks once the four checks above are done. Worth more XP, written to A Level Paper 3 and Paper 4 standard.
Finish the four checks above to unlock the exam questions
Exam style+20 XP
With an 8-bit mantissa and a 4-bit exponent, both two's complement, what is the largest positive number?
Exam style+20 XP
Using the same format, which is the smallest positive normalised number?
Exam style+20 XP
What is underflow in floating-point arithmetic?
Exam style+20 XP
Normalise 11100100 0011. What is the result?
Skill unlocked
Normalisation, range and precision, mastered.
This skill is now recorded on your profile. Keep the chain going.