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

Q51 · 9618/31/O/N/25 Q2

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

Q519618/31/O/N/25original Q2Structured · 6 marks
Question 2 from 9618/31/O/N/25

Worked solution

(a)

A normalised positive number starts 0.1. Move the binary point right until the first 1 is just after it.

0.00000001110101101 has 7 zeros after the point, so the point moves 7 places right: 0.1110101101 × 2−7

Mantissa (12 bits): 0.1110101101 with a 0 added at the end to fill 12 bits.

MantissaExponent
0 1 1 1 0 1 0 1 1 0 1 01 0 0 1

Mantissa 011101011010 [1]

Exponent: -7 in two's complement. 7 = 0111, invert = 1000, add 1 = 1001 [1]

(b)

Convert 76.1875 to binary using place values, then make it negative.

76.1875 = 64 + 8 + 4 + 0.125 + 0.0625 = 1001100.0011 [1]

Write it with a leading 0: 01001100.0011. Make it negative with two's complement: invert all the bits and add 1.

-76.1875 = -128 + 32 + 16 + 2 + 1 + 0.5 + 0.25 + 0.0625 = 10110011.1101 [1]

Normalise: a negative mantissa starts 1.0, so move the binary point 7 places left to get 1.0110011 1101 × 27 [1]

Mantissa: 1 0110011 1101 gives 12 bits. Exponent: +7 = 0111.

MantissaExponent
1 0 1 1 0 0 1 1 1 1 0 10 1 1 1

Mantissa 101100111101 and exponent 0111 both correct [1]

KEY IDEAFind the binary number, move the point until the mantissa starts 0.1 or 1.0, and the number of places moved is the exponent.
TOTAL 6 marks

Official mark scheme

Mark scheme for 9618/31/O/N/25 question 2
VIDEO
▶ Starts at Q2 (10:30)

Starts at Q2 (10:30) · 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.