Question bank › A-level Computer Science › Fundamentals of data representation

Number systems, number bases, bits, bytes and units

Answer on paper first, then reveal the mark scheme one mark at a time.

1Core4 marks

The diagram shows how the sets of natural numbers ($\mathbb{N}$), integers ($\mathbb{Z}$), rational numbers ($\mathbb{Q}$) and real numbers ($\mathbb{R}$) relate to each other. Four regions are labelled A, B, C and D.

For each value below, state the letter of the region in which it belongs. [4]

(i) $0$   (ii) $-7$   (iii) $0.375$   (iv) $\sqrt{5}$

R (real numbers) Q (rational) Z (integers) N (natural) A B C D
2Core3 marks

A ticket system at a concert hall stores data about each customer in a queue for returned tickets.

(a) A customer is told they are 14th in the queue. State the type of number that describes this position. [1]

(b) The hall also records the length of time, in minutes, that each customer waited. Explain why this value should be treated as a real number rather than a natural number. [2]

3Core4 marks

A pixel's red component is stored as the denary value 203.

(a) Convert 203 into 8-bit unsigned binary. [1]

(b) Convert 203 into hexadecimal. [1]

(c) Explain why programmers often write colour values in hexadecimal rather than binary. [2]

Stuck on Number systems, number bases, bits, bytes and units?

Get it sorted in a free 30-minute session

We work through your weakest questions on this topic on Zoom. I reply the same day.

4Standard3 marks

A 12-bit status register holds the unsigned binary value

1011 0110 1101

(a) Convert this value to hexadecimal. [1]

(b) Convert this value to denary. You must show your working. [2]

5Standard3 marks

A wildlife charity attaches a tracking tag to each animal. Each tag stores a unique ID as an unsigned binary number. The charity currently needs 3000 different IDs.

(a) Calculate the minimum number of bits needed for the ID. Show how you reached your answer. [2]

(b) The charity plans to tag up to 20 000 animals. State how many extra bits would be needed compared with your answer to (a). [1]

6Standard3 marks

A solid-state drive is advertised as having a capacity of 500 GB. When connected, the operating system reports its capacity using binary prefixes.

(a) Calculate the capacity of the drive in GiB. Give your answer to 1 decimal place. [2]

(b) Explain why the two figures are different even though no storage has been lost. [1]

7Hard4 marks

A data logger in a greenhouse takes a 16-bit temperature reading every 5 seconds for exactly 24 hours. No other data is stored.

(a) Calculate the amount of storage needed for the readings, in KiB. Show your working. [3]

(b) The logger has 32 KiB of memory for readings. State, with a reason, whether all of the readings can be stored. [1]

8Hard4 marks

In a byte-addressable memory, every address refers to one byte. Addresses are written in hexadecimal.

(a) A small embedded system uses addresses 0000 to FFFF. State how many bytes of memory can be addressed. [1]

(b) Express your answer to (a) using the most appropriate binary prefix. [1]

(c) Another system has 1 MiB of byte-addressable memory starting at address 0. State the highest address in hexadecimal. [1]

(d) State the minimum number of hexadecimal digits needed to write every address in a 4 GiB byte-addressable memory. [1]

9Stretch4 marks

The subroutine below converts a positive denary integer into hexadecimal. String indexing starts at 0, so digits[10] is "A".

FUNCTION ToHex(n)
  digits ← "0123456789ABCDEF"
  result ← ""
  WHILE n > 0
    r ← n MOD 16
    result ← digits[r] + result
    n ← n DIV 16
  ENDWHILE
  RETURN result
ENDFUNCTION

(a) Complete a trace table with columns n, r and result for the call ToHex(1000). Show the value of n at the start of each iteration. [3]

(b) State the value returned. [1]

10Stretch4 marks

A student says: “1 TB and 1 TiB are basically the same amount of storage.”

(a) Calculate exactly how many more bytes there are in 1 TiB than in 1 TB. [1]

(b) Express this difference as a percentage of 1 TB, to 3 significant figures. [1]

(c) The percentage difference between kibi and kilo is only 2.4%. Explain why the percentage difference becomes larger for each larger prefix. [2]

Stuck on this topic?

Book a free 30-minute session on WhatsApp and we'll find exactly which step is costing you the marks. Or build a timed paper on it.

Free 30-minute session