Question 5
OCR Computer Science June 2016 Paper 1AS7 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
Question text
5 (a) Give the number 55 in binary as an 8-bit unsigned integer. [2] (b) Represent the number 55 in normalised floating point binary notation, using 8 bits for the mantissa followed by 8 bits for the exponent, both in two’s complement binary. [2] (c) Represent the number 55 in normalised floating point binary notation, with the mantissa and exponent both in two’s complement binary, using as few bits as possible. [2] (d) State why a programmer might choose to declare a variable as a floating point number. [1]