9618/32/M/J/24 question 1: worked solution (May/June 2024, paper 32)

Show as 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. Q43 9618/32/M/J/24 original Q1 Structured · 5 marks Worked solution (a) More bits for the mantissa gives greater precision (accuracy); fewer bits gives less precision. [1] More bits for the exponent gives a bigger range of numbers; fewer bits gives a smaller range. With a fixed total, a larger range means lower accuracy and a smaller range means higher accuracy. [1] (b) Write 54.8125 in binary: 32 + 16 + 4 + 2 + 0.5 + 0.25 + 0.0625 = 110110.1101 [1] Normalise: put the point after the sign bit, 0.1101101101. The point moves 6 places , so the exponent is 6 = 0110. [1] The mantissa has 12 bits, so pad with zeros: 011011011010. Mantissa Exponent 011011011010 0110 Write the mantissa 011011011010 and the exponent 0110 [1] KEY IDEA Mantissa bits give precision, exponent bits give range; with a fixed total, gaining one loses the other. TOTAL 5 marks Official mark scheme VIDEO ▶ Starts at Q1 (0:21) Starts at Q1 (0:21) · by Pseudocode Pro. Tap the picture to open it on YouTube.