OCR H446 · A Level Computer Science · ~14 min read
Notes
Video
Slides
Worksheet
Quiz
Floating Point Representation
Computers need to represent very large numbers (e.g. the distance from Earth to Andromeda in metres) and very small numbers (e.g. the mass of an electron). Fixed-point binary cannot handle this efficiently. Floating point solves the problem by storing a number in two parts: mantissa and exponent.
The Floating Point Format
A floating point number is stored as:
Value = Mantissa × 2Exponent
Mantissa: stores the significant digits (the fractional part of the number)
Exponent: stores the power of 2 (controls the magnitude — how big or small the number is)
Both mantissa and exponent are stored in two's complement (so negative values are possible)
Binary Point and Normalisation
The binary point is always assumed to be immediately after the sign bit of the mantissa. A normalised floating point number has its mantissa in a specific form to maximise precision:
For a positive number: mantissa must start with 0.1... (sign bit = 0, first mantissa bit = 1)
For a negative number: mantissa must start with 1.0... (sign bit = 1, first mantissa bit = 0)
Normalisation ensures the maximum number of significant bits are used — no leading zeros (positive) or leading ones (negative) are wasted.
In a fixed-bit system (e.g. 16 bits total), bits must be allocated between mantissa and exponent. Changing this allocation has consequences:
More bits for…
Effect on precision
Effect on range
Mantissa
Higher precision (more significant bits)
Smaller range of values
Exponent
Lower precision (fewer significant bits)
Larger range of values (bigger/smaller numbers)
Normalisation in Detail
To normalise a floating point number, shift the binary point (adjust exponent) until the mantissa satisfies the normalised form:
Normalise: 00110100 mantissa, exponent 0000
Current mantissa: 00.110100 (starts with 00 — not normalised for positive, should be 0.1...)
Shift binary point left by 1 = 0.0110100, increase exponent by 1: exponent = 0001
Still 0.0... — not 0.1... Shift again: 0.110100, exponent = 0010
Now mantissa = 0.110100 → normalised! Store as mantissa = 01101000, exponent = 0010
Underflow and Overflow in Floating Point
Overflow: the exponent is too large to be stored — result is greater than the maximum representable value (exponent field saturates)
Underflow: the exponent is too negative — result is too close to zero to represent accurately (the number becomes 0, losing the value)
Rounding Errors
Because mantissas have finite bits, most real numbers cannot be represented exactly. The rounding error (or truncation error) is the difference between the stored value and the true value. More mantissa bits = smaller rounding errors.
IEEE 754 Standard (Context)
Modern computers use IEEE 754, which defines 32-bit (single precision) and 64-bit (double precision) formats. You do not need to know the specific IEEE 754 bit layout for OCR H446, but you should understand the general principle: sign bit, exponent field, mantissa (significand) field.
Format
Total bits
Sign
Exponent
Mantissa
Single precision
32
1
8
23
Double precision
64
1
11
52
Exam tip: For normalisation — positive normalised mantissa starts with 0.1; negative starts with 1.0. If asked to normalise, shift the binary point right (dividing mantissa by 2) and decrease the exponent for each shift, OR shift left (multiplying by 2) and increase the exponent — until the mantissa is in normalised form.
Exam tip: "More precision" means more mantissa bits — the number is stored more accurately. "Greater range" means more exponent bits — you can represent much larger or smaller values. These are trade-offs with a fixed total number of bits.
⚠ Common Mistakes
Forgetting that the binary point is after the sign bit — the first bit after the sign bit is ½, not 1.
Confusing precision (mantissa bits) with range (exponent bits) — more mantissa bits do NOT increase range.
Not normalising properly — a leading 0 after the binary point (for positive) or a leading 1 after the binary point (for negative) means the number is not normalised and is wasting precision.
✓ Notes completed!
▶
Video coming soon
Click to advance · Arrow keys also work
Click slide or press arrow keys to navigate
✍
Worksheet — 1.4.1c Floating Point Representation
8 questions · 20 marks · instantly marked
Q1A floating point number uses an 8-bit two's complement mantissa and a 4-bit two's complement exponent. The mantissa is 01011000 and the exponent is 0010. Calculate the denary value.[3 marks]
Q2What is meant by a normalised floating point number? State the conditions for normalisation for both positive and negative numbers.[3 marks]
✓ Mark scheme
A normalised floating point number has its mantissa arranged to maximise the number of significant bits stored [1]. For a positive number: mantissa starts with 0.1 (sign bit 0, next bit 1) [1]. For a negative number: mantissa starts with 1.0 (sign bit 1, next bit 0) [1].
Q3A floating point number has mantissa 10110000 (8 bits, two's complement) and exponent 0011 (4 bits, two's complement). Calculate the denary value.[4 marks]
Q4A computer uses 16 bits total for floating point: 12 for the mantissa and 4 for the exponent. A designer proposes changing to 8 bits for mantissa and 8 for exponent. Describe the effect on (a) precision and (b) range.[4 marks]
✓ Mark scheme
(a) Precision decreases — fewer mantissa bits (8 vs 12) means fewer significant binary digits are stored; rounding errors become larger; the gap between representable numbers increases [2]. (b) Range increases — more exponent bits (8 vs 4) means much larger or smaller values can be represented (exponent can take a wider range of values, so the scale factor 2^exponent spans more orders of magnitude) [2].
Q5Explain what floating point underflow is and give a circumstance when it would occur.[2 marks]
✓ Mark scheme
Underflow occurs when the result of an arithmetic operation produces a number too close to zero to be represented (the exponent is too small/negative to be stored) [1]; for example, dividing a very small positive number by a very large number, so the result approaches zero but cannot be distinguished from zero in the available exponent range [1].
Q6Is the mantissa 01101100 (8-bit, two's complement) normalised? If not, normalise it and state what adjustment must be made to the exponent.[3 marks]
✓ Mark scheme
Binary point representation: 0.1101100. The first bit after the binary point is 1 — this IS normalised for a positive number [1]. No adjustment needed to exponent [2 — accept 1 if identified as normalised with no justification].
Q7Explain why rounding errors occur in floating point arithmetic, and how the precision of the mantissa affects the size of these errors.[3 marks]
✓ Mark scheme
Rounding errors occur because the mantissa has a finite number of bits, so most real numbers cannot be stored exactly — they must be rounded or truncated to the nearest representable value [1]. The stored value differs from the true value by the rounding error [1]. A longer mantissa (more bits) produces smaller rounding errors because the gaps between representable numbers decrease — the approximation is closer to the true value [1].
Q8A non-normalised mantissa is 00011010 with exponent 0001. Normalise it and state the new mantissa and exponent.[3 marks]
✓ Mark scheme
Binary point: 0.0011010. For a positive number, normalised form requires 0.1.... Need to shift left by 2 positions (move binary point right relative to bits, shifting mantissa left, decrease exponent by 2) [1]. Mantissa becomes: 0.1101000 = 01101000 [1]. Exponent: 0001 − 2 = 1111 (= −1 in two's complement) [1].
Topic Quiz
1 of 15
You scored
out of 15
🎯
Mini Test — 1.4.1c Floating Point
10 questions · 10 marks · 10 minutes
5 MCQ + 5 short answer
⏱10:00
10 marks
Section A — Multiple Choice
Q1In a floating point number, the mantissa stores:
Q2A positive floating point mantissa is normalised when it begins with:
Q3Increasing the number of bits allocated to the exponent (at the expense of the mantissa) will:
Q4Floating point underflow occurs when:
Q5A floating point number has mantissa 01100000 and exponent 0010. The denary value is:
Section B — Short Answer
Q6What is the purpose of the exponent in a floating point number?
Mark schemeThe exponent determines the scale/magnitude of the number — it controls how far the binary point is shifted (the power of 2). A larger exponent means the number is much larger; a smaller/more negative exponent means the number is very small (closer to zero). [1 mark]
Q7Why is normalisation of floating point numbers important?
Mark schemeNormalisation ensures maximum precision — all available mantissa bits are used for significant digits, with no leading zeros (positive) or leading ones (negative) wasted. It also ensures each number has a unique representation. [1 mark]
Q8State the normalised form condition for a negative floating point mantissa.
Mark schemeFor a negative number, the normalised mantissa must start with 1.0 — sign bit = 1, and the bit immediately after the binary point = 0. Any leading 1s after the sign are wasted bits. [1 mark]
Q9What is meant by a rounding error in floating point representation?
Mark schemeA rounding error is the difference between the true value of a real number and the nearest value that can be stored in the floating point format. It arises because the mantissa has finite bits and cannot exactly represent every real number — the value is rounded or truncated. [1 mark]
Q10Give one advantage of using double precision (64-bit) floating point over single precision (32-bit).
Mark schemeDouble precision has more mantissa bits (52 vs 23) so rounding errors are much smaller — numbers can be stored more accurately/precisely. It also has more exponent bits (11 vs 8) so a greater range of values can be represented. [1 mark for either correct point]