Edexcel GCSE Computer Science (1CP2) · Data › Data representation
Practise Limitations of binary representation. 11 exam-style questions on this subtopic, at up to four difficulty levels, with full mark schemes and a progress tracker. Free, no account needed.
Cover the answers and test yourself. The app has these as flashcards that come back just before you'd forget them.
State the number of different colours that each pixel can have.
2
The lift is moved to a new building that has floors numbered from 0 to 20. Explain why the floor number can no longer be stored in 4 bits.
4 bits can only store 0 to 15, so floors 16 to 20 cannot be represented.
State the number of different characters that can be represented using 7-bit ASCII.
128
Sample questions
Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.
Question 1Easy4 marks
A school prints its newsletter on a printer that can only print black dots on white paper. Every image in the newsletter is stored as a bitmap with a colour depth of 1 bit.
(a) State the number of different colours that each pixel can have.[1]
(b) A colour photograph of the school's sports day is converted to this format. Explain why the converted image is not an accurate copy of the photograph.[2]
(c) The school changes the colour depth of its images to 8 bits. The resolution stays the same. State the effect of this change on the file size of each image.[1]
Show the answer and mark scheme
(a)Answer: 2
2 (21)
(b)Answer: 1 bit gives only two values, so each pixel must be black or white; every other colour and shade has to be changed to one of these, so detail is lost.
with 1 bit per pixel, each pixel can only be one of two colours (black or white)
so every other colour and shade in the photograph has to be changed to black or white, and colour / shading / detail is lost
(c)Answer: It is 8 times larger.
the file size is 8 times larger
Question 2Medium5 marks
A greenhouse sensor measures temperatures from 0 °C to 51 °C. Each reading is stored as an 8-bit unsigned binary integer. The stored value 0 represents 0 °C, the stored value 255 represents 51 °C, and the values in between are evenly spaced.
(a) Calculate the change in temperature represented by an increase of 1 in the stored value.[2]
(b) The actual temperature is 20.1 °C. Explain why the sensor cannot store this temperature exactly.[2]
(c) Give one change that would allow the temperature to be stored more precisely.[1]
Show the answer and mark scheme
(a)Answer: 0.2 °C
51 ÷ 255
0.2 (°C)
(b)Answer: Temperatures can only be stored in steps of 0.2 °C (100 = 20.0 °C, 101 = 20.2 °C), so 20.1 °C has to be rounded.
the stored values can only represent temperatures in steps of 0.2 °C, e.g. 100 represents 20.0 °C and 101 represents 20.2 °C
20.1 °C is between two values that can be stored, so it has to be rounded (to 20.0 °C or 20.2 °C)
(c)Answer: Store each reading using more bits, e.g. 16 bits, so the steps are much smaller.
use more bits for each reading, e.g. 16 bits, so that the steps between stored values are smaller / use the same 8 bits for a smaller range of temperatures
Question 3Hard6 marks
A traffic counter records the number of vehicles that pass it each day. The count is stored as a 16-bit unsigned binary integer and is reset to 0 at midnight.
(a) State the largest count that can be stored.[1]
(b) On a busy motorway, an average of 4 vehicles pass the counter every second, all day. Explain whether the counter can store the total for a whole day. You must include a calculation in your answer.[3]
(c) Calculate the minimum number of bits needed to store the daily total for this motorway.[2]
Show the answer and mark scheme
(a)Answer: 65,535
65,535 (216 − 1)
(b)Answer: 4 × 86,400 = 345,600 vehicles a day, which is more than 65,535, so the counter would overflow.
vehicles in a day: 4 × 60 × 60 × 24 / 4 × 86,400
= 345,600
345,600 is greater than 65,535, so the total cannot be stored: the count overflows and the stored total would be wrong