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

Q47 · 9618/33/O/N/24 Q1

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

Q479618/33/O/N/24original Q1Structured · 6 marks
Question 1 from 9618/33/O/N/24

Worked solution

(a)

Change 201.125 to binary: 128 + 64 + 8 + 1 = 11001001 and 0.125 = 0.001, so 11001001.001.

Working: number converted to binary [1]

Move the binary point 8 places left to get 0.11001001001, so the exponent is 8 = 001000. Working: use of the exponent [1]

The mantissa has only 10 bits, so keep 0.110010010. The last two bits (01) do not fit and are lost, so precision is lost. Mantissa 0 1 1 0 0 1 0 0 1 0, exponent 0 0 1 0 0 0 [1]

The answer mark may instead be earned by stating that the number loses precision (rounding error).

(b)

Exponent 000101 = 5, so move the binary point 5 places right: 1.010110011 becomes 101011.0011.

Working: use of the exponent / binary point moved 5 places [1]

Value: −32 + 8 + 2 + 1 + 0.125 + 0.0625 [1]

Answer: −20.8125 [1]

KEY IDEAA floating-point number is its mantissa with the binary point moved by the exponent, and a mantissa too short for the number loses precision.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/33/O/N/24 question 1
VIDEO
▶ Starts at Q1 (3:00)

Starts at Q1 (3:00) · by Zafar Ali Khan (ZAK). 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.