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

Q49 · 9618/32/M/J/25 Q2

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

Q499618/32/M/J/25original Q2Structured · 6 marks
Question 2 from 9618/32/M/J/25

Worked solution

(a)

Change 124.4375 to binary: 64 + 32 + 16 + 8 + 4 = 1111100 and 0.4375 = 0.0111, so 1111100.0111.

Working: number converted to binary (0)1111100.0111 [1]

Move the binary point 7 places left, so the exponent is 7. Working: use of the exponent [1]

Mantissa 0 1 1 1 1 1 0 0 0 1 1 1, exponent 0 1 1 1 [1]

(b)

Exponent 0110 = 6, so move the binary point 6 places right: 1010001.01011.

Working: correct use of the exponent [1]

Value as two's complement: −64 + 16 + 1 + 0.25 + 0.0625 + 0.03125. Working: correct conversion to denary [1]

Answer: −46.65625 [1]

KEY IDEATo store a positive number, write it in binary, move the point to follow 0.1 and count the places for the exponent.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/32/M/J/25 question 2
VIDEO
▶ Topic lesson

A lesson on this topic · by Craig'n'Dave. 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.