9618/31/O/N/22 question 1: worked solution (October/November 2022, paper 31)

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. Q36 9618/31/O/N/22 original Q1 Structured · 9 marks Worked solution (a) Change 202 to binary: 128 + 64 + 8 + 2 = 11001010 [1] Put the point after the sign bit: 0.11001010 × 2⁸. The point moves 8 places, so the exponent is 8 [1] Mantissa Exponent 01100101 00001000 Correct mantissa and exponent [1] (b) Start with the positive mantissa 01100101. Invert: 10011010. Add 1: 10011011 [1] The exponent is the same as for +202, which is 8 [1] Mantissa Exponent 10011011 00001000 Correct mantissa and exponent [1] (c)(i) The mantissa begins with 00 . A normalised mantissa must start 01 or 10, so the first two bits must be different [1] (c)(ii) Shift the mantissa left 2 places: 00011110 becomes 01111000. Take 2 off the exponent: 24 – 2 = 22. Mantissa Exponent 01111000 00010110 Correct mantissa [1] Correct exponent [1] KEY IDEA Normalise by shifting the mantissa until it starts 01 or 10, and change the exponent by the same number of places. TOTAL 9 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by MAK CS. Tap the picture to open it on YouTube.