Cambridge A2 Level Computer Science 9618 · 13.3 Floating-point numbers, representation and manipulation

Q43 · 9618/32/M/J/24 Q1

Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 3 of 3.

Q439618/32/M/J/24original Q1Structured · 5 marks
Question 1 from 9618/32/M/J/24

Worked solution

(a)

More bits for the mantissa gives greater precision (accuracy); fewer bits gives less precision. [1]

More bits for the exponent gives a bigger range of numbers; fewer bits gives a smaller range. With a fixed total, a larger range means lower accuracy and a smaller range means higher accuracy. [1]

(b)

Write 54.8125 in binary: 32 + 16 + 4 + 2 + 0.5 + 0.25 + 0.0625 = 110110.1101 [1]

Normalise: put the point after the sign bit, 0.1101101101. The point moves 6 places, so the exponent is 6 = 0110. [1]

The mantissa has 12 bits, so pad with zeros: 011011011010.

MantissaExponent
0110110110100110

Write the mantissa 011011011010 and the exponent 0110 [1]

KEY IDEAMantissa bits give precision, exponent bits give range; with a fixed total, gaining one loses the other.
TOTAL 5 marks

Official mark scheme

Mark scheme for 9618/32/M/J/24 question 1
VIDEO
▶ Starts at Q1 (0:21)

Starts at Q1 (0:21) · by Pseudocode Pro. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.