Question 7
OCR Computer Science Specimen Paper 1A level14 marks
On the specification
- (a)
- 1.4 Data types, data structures and algorithms
- (b)
- 1.4 Data types, data structures and algorithms
- (c)
- 1.4 Data types, data structures and algorithms
- (d)
- 1.4 Data types, data structures and algorithms
- (e)
- 1.4 Data types, data structures and algorithms
- (f)
- 1.4 Data types, data structures and algorithms
Question text
(a) Two equal (unsigned) integers, shown below, are added together. Calculate the result, showing your working. 00010101 00010101 + ———————— [2] (b) State which bitwise manipulation on 00010101 would have achieved the same result as the calculation on part (a). [1] (c) Convert the denary number -52 into an 8-bit binary number using two’s complement. [2] (d) Describe why two’s complement may be preferable to sign and magnitude. [2] (e) Using floating point representation with 4 bits for the exponent and 4 bits for the mantissa add together the following floating point binary numbers and write the answer as a normalised floating point number with 4 bits mantissa and 4 bit exponent. 0110 0010 and 0100 0011 [3] (f) Demonstrate subtraction in binary using 8-bit two’s complement using the equivalent of the denary calculation 47-23. You must show all working. [4]