9618/32/O/N/24 question 4: worked solution (October/November 2024, paper 32)
Show as plain textHide plain text
Cambridge A2 Level Computer Science 9618 · 13.3 Floating-point numbers, representation and manipulation Worked solution from the Data Representation Paper 3 Advanced Theory booklet, Part 3 of 3. Q46 9618/32/O/N/24 original Q4 Structured · 6 marks Worked solution (a) Mantissa 0.10001110111 (binary point after the first bit). Exponent 0111 = 7, so move the binary point 7 places right. 0.10001110111 × 2⁷ = 01000111.0111 Working: 64 + 4 + 2 + 1 + 0.25 + 0.125 + 0.0625 [1] Answer: 71.4375 [1] (b) Change 49.1875 to binary: 49 = 110001 and 0.1875 = 0.0011, so 0110001.0011. Make it negative with two's complement: flip all the bits and add 1 to get 1001110.1101 (that is −64 + 8 + 4 + 2 + 0.5 + 0.25 + 0.0625). Working: number converted to binary and to its negative two's complement form [1] Normalise: the binary point must move 6 places left to give 1.00111011010, so the exponent is 6 = 0110. Working: use of the exponent, move 6 places / 2⁶ [1] Mantissa (12 bits): 1 0 0 1 1 1 0 1 1 0 1 0 [1] Exponent (4 bits): 0 1 1 0 [1] KEY IDEA Move the binary point by the exponent to read a floating-point value, and for a negative number use two's complement before normalising so the mantissa starts 10. TOTAL 6 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.