9618/12/O/N/21 question 4: worked solution (October/November 2021, paper 12)

Show as plain text

Cambridge AS Level Computer Science 9618 · 1.1 Data Representation Worked solution from the Information representation Paper 1 Theory Fundamentals booklet, Part 1 of 3. Q4 9618/12/O/N/21 original Q4 Structured · 8 marks Worked solution (a) 11001101 = 128 + 64 + 8 + 4 + 1 = 205 [1] (b) The left bit is −128: −128 + 64 + 8 + 4 + 1 = −51 [1] (c) Split into groups of 4 bits: 1100 = C, 1101 = D. Answer: CD [1] (d) In BCD each group of 4 bits must be 9 or less. Here 1100 (12) and 1101 (13) are greater than 9 . [1] (e)(i) Add column by column: 0 0 1 1 1 1 0 1 + 0 0 1 0 1 1 0 1 = 0 1 1 0 1 0 1 0 Working with carries shown [1] Answer: 01101010 [1] (e)(ii) Subtract by adding the two's complement of Register 2. Register 2 = 00101101. Invert: 11010010. Add 1: 11010011. Add: 00111101 + 11010011 = 1 00010000. Ignore the extra carry on the left. Working (two's complement added) [1] Answer: 00010000 [1] KEY IDEA The same bits mean different things as unsigned, two's complement, hexadecimal or BCD. TOTAL 8 marks Official mark scheme VIDEO ▶ Starts at Q4 (10:09) Starts at Q4 (10:09) · by HyperDavester. Tap the picture to open it on YouTube.