Data Types (OCR A Level Computer Science): Exam Questions

1 hour18 questions
11 mark

Convert the denary number 189 to hexadecimal.

Did this page help you?

21 mark

Convert the unsigned binary number 1010101111 to hexadecimal.

Did this page help you?

3a1 mark

Negative binary values can be represented using either sign and magnitude or two’s complement.

Convert the denary number -107 to an 8-bit binary number using sign and magnitude.

3b1 mark

Convert the denary number -107 to an 8-bit binary number using two’s complement.

3c1 mark

Give one advantage of storing values using two’s complement instead of sign and magnitude.

Did this page help you?

4a1 mark

A video streaming service uses a relational database. An extract of the data from two tables from this database is shown in Fig. 2.

Membership contains data about current memberships that customers hold and package contains data about different streaming packages available.

Table showing user memberships and packages: five users with start dates and package types, and a package table detailing costs and advert presence.

Identify the data type of the CostPerMonth(£) field.

4b1 mark

Give the name of the field that could be stored using a Boolean data type.

Did this page help you?

5a1 mark

Convert the hexadecimal value B7E to a binary number

5b1 mark

110010101 is a binary number that is represented using sign and magnitude.

Convert this binary number to a denary number.

Did this page help you?

6a1 mark

Give one similarity between ASCII and Unicode.

6b2 marks

Give two differences between ASCII and Unicode.

Did this page help you?

7a1 mark

Convert the denary number 231 to an unsigned 8-bit binary number.

7b1 mark

Convert the hexadecimal number 6F to an unsigned 8-bit binary number.

Did this page help you?

8a1 mark

Convert the denary number −119 to an 8-bit binary number with two’s complement representation.

8b1 mark

Convert the unsigned binary number 1101101 to hexadecimal.

8c1 mark

Convert the denary number 171 to hexadecimal

8d2 marks

Convert the hexadecimal number A6 to binary.

Did this page help you?

12 marks

Complete each of the following sentences relating to the storage of floating point binary numbers with an appropriate word.

Increasing the number of bits used for the mantissa increases the .......................................... of the number that can be stored.

Increasing the number of bits used for the exponent increases the .......................................... of the number that can be stored.

Did this page help you?

23 marks

Complete this binary subtraction.

Both numbers are 8-bit integer values represented using two’s complement.

Show the result in the same format and show your working

0110 1101

– 0011 0100
-----------

-----------

Did this page help you?

34 marks

The normalised floating point number 1010 1110 is stored using 4 bits for the mantissa and 4 bits for the exponent, both in two’s complement.

Give the denary version of this number, showing your working.

Did this page help you?

44 marks

Table 3 here shows floating point numbers that are stored using 6 bits for the mantissa and 3 bits for the exponent, both in two’s complement.

Tick (✓) one box in each row to state whether each number is normalised or not normalised.

Binary number

Normalised

Not normalised

010101 100

110101 111

011010 010

101010 110

Table 3

Did this page help you?

5a4 marks

The floating point number 0011010100 is stored using 6 bits for the mantissa and 4 bits for the exponent, both in two’s complement. This number is not normalised.

Give the normalised version of this number, showing your working

5b3 marks

Convert your answer to part (A) to denary, showing your working.

Did this page help you?

65 marks

Add together the two numbers below. Both numbers are stored in normalised floating point format, using 6 bits for their mantissa and 4 bits for their exponent which are both in two’s complement.

Show the result in the same format and show your working.

0 1 1 0 0 0 0 1 1 0 +

0 1 0 1 0 0 0 1 0 0

-----------------

Did this page help you?

7a2 marks

Show the result of applying an XOR mask of 1100 0111 to the byte 0101 1101.

Byte

XOR mask

0101 1101

1100 0111

7b2 marks

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.

Did this page help you?

13 marks

The normalised floating point binary number 0100 1110 is stored using 4 bits for the mantissa and 4 bits for the exponent, both in two’s complement.

Convert this number to denary.

You must show your working.

Did this page help you?

25 marks

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.

Did this page help you?

34 marks

Show how the denary value -15.75 can be represented as a normalised floating point binary number using 8 bits for the mantissa and 4 bits for the exponent.

You must show your working.

Did this page help you?