Question 3

OCR Computer Science November 2020 Paper 1A level14 marks

On the specification

(a)(i)
1.4 Data types, data structures and algorithms
(a)(ii)
1.4 Data types, data structures and algorithms
(a)(iii)
1.4 Data types, data structures and algorithms
(a)(iv)
1.4 Data types, data structures and algorithms
(b)
1.4 Data types, data structures and algorithms
(c)(i)
1.4 Data types, data structures and algorithms
(c)(ii)
1.4 Data types, data structures and algorithms
Question text

3 (a) (i) Convert the denary number −119 to an 8-bit binary number with two’s complement representation. [1] (ii) Convert the unsigned binary number 1101101 to hexadecimal. [1] (iii) Convert the denary number 171 to hexadecimal. [1] (iv) Convert the hexadecimal number A6 to binary. [2] (b) Show how the denary value −9.125 can be represented in normalised floating point format, using 8 bits for the mantissa and 4 bits for the exponent, both in two’s complement. [5] (c) (i) Show the result of applying an XOR mask of 1100 0111 to the byte 0101 1101. Byte 0101 1101 XOR mask 1100 0111 [2] (ii) Describe a mask that could be applied to an 8-bit number to ensure that: • the most significant bit is always set to 1 • all other bits remain unchanged. [2]