9618/33/O/N/24 question 1: worked solution (October/November 2024, paper 33)
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. Q47 9618/33/O/N/24 original Q1 Structured · 6 marks Worked solution (a) Change 201.125 to binary: 128 + 64 + 8 + 1 = 11001001 and 0.125 = 0.001, so 11001001.001. Working: number converted to binary [1] Move the binary point 8 places left to get 0.11001001001, so the exponent is 8 = 001000. Working: use of the exponent [1] The mantissa has only 10 bits, so keep 0.110010010. The last two bits (01) do not fit and are lost, so precision is lost. Mantissa 0 1 1 0 0 1 0 0 1 0 , exponent 0 0 1 0 0 0 [1] The answer mark may instead be earned by stating that the number loses precision (rounding error). (b) Exponent 000101 = 5, so move the binary point 5 places right: 1.010110011 becomes 101011.0011. Working: use of the exponent / binary point moved 5 places [1] Value: −32 + 8 + 2 + 1 + 0.125 + 0.0625 [1] Answer: −20.8125 [1] KEY IDEA A floating-point number is its mantissa with the binary point moved by the exponent, and a mantissa too short for the number loses precision. TOTAL 6 marks Official mark scheme VIDEO ▶ Starts at Q1 (3:00) Starts at Q1 (3:00) · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.