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

Q39 · 9618/32/M/J/23 Q1

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

Q399618/32/M/J/23original Q1Structured · 5 marks
Question 1 from 9618/32/M/J/23

Worked solution

(a)

Remove the leading 0 and move the binary point to just after the first digit so the number starts 0.1: 0101010.111 = 0.101010111 × 26.

The point moved 6 places, so the exponent is denary 6 = 000110 in 6 bits.

The mantissa is the sign bit 0 followed by the digits 101010111, which fills all 10 bits.

MantissaExponent
0101010111000110

Mantissa 0101010111 [1]

Exponent 000110, with the working that the point moved 6 places [1]

(b)

0101011.111001 in normalised form is 0.101011111001 × 26.

Write: the mantissa would need 13 bits (0.101011111001 is 13 digits with the sign bit) [1]

... but the system can only store 10 bits for the mantissa [1]

The 3 least significant digits are cut off (truncated), which causes a loss of precision [1]

KEY IDEANormalise by moving the point until the mantissa starts 0.1, count the moves for the exponent, and extra mantissa digits are truncated, so precision is lost.
TOTAL 5 marks

Official mark scheme

Mark scheme for 9618/32/M/J/23 question 1
VIDEO
▶ Whole paper

Video solution of the whole paper · by qiphyedu. 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.