Level:
Correct: 0
Incorrect: 0
Marks: 0/0
Exam Practice
Course:
Topics:
AQA GCSE Computer Science (Paper 2) Smart practice A mixed round aimed at your weak spots
Unit 1
3.3 Fundamentals of data representation
Unit 2
3.4 Computer systems
Unit 3
3.5 Fundamentals of computer networks
Unit 4
3.6 Cyber security
Fundamentals of cyber security; cyber security threats
Cyber security, its threats and penetration testing
Methods to detect and prevent cyber security threats
Detecting and preventing cyber security threats
Unit 5
3.7 Relational databases and SQL
Unit 6
3.8 Ethical, legal and environmental impacts
Ethical, legal and environmental impacts
Ethical, legal and environmental impacts of technology
Avg
score:
–
Topics
done:
0/22

Representing images: pixels and colour depth

Practise 30 exam-style questions on Representing images: pixels and colour depth for AQA GCSE Computer Science (Paper 2). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with the Study Helper on hand if you get stuck.

  • 30 questions
  • 1–4 marks each
  • Instant marking
  • No sign-up needed
20 questions, marked as you go

Sample questions with model answers

Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.

Question 1

1 mark

A digital painting app stores each pixel using a colour depth of 6 bits.

What is the maximum number of different colours that an image created in the app can contain?

Choose your answer.

  • 6
  • 12
  • 36
  • 64

Model answer

64, because 6 bits give 2⁶ = 64 different bit patterns.

Explanation

With n bits there are 2ⁿ different bit patterns, and each pattern can stand for one colour, so 6 bits give 2⁶ = 64 colours. 12 comes from doubling 6 and 36 from squaring it, and both are wrong. Each extra bit doubles the number of colours available.

Mark scheme
  1. 1 mark

    64

    Mark is for AO2 (apply). If more than one option is given, 0 marks.

Question 2

2 marks

The pixel data in a bitmap file is stored as one long sequence of bits, row by row, starting at the top left of the image.

Explain why the file must also store the width of the image in pixels and its colour depth.

Model answer

The width tells the computer how many pixels are in each row, so it knows where one row ends and the next row starts when it rebuilds the grid. The colour depth tells it how many bits make up each pixel, so it can split the sequence into the right-sized codes and look up each pixel's colour. Without these, the same 48 bits could be a 6 × 4 image with 2 bits per pixel or a 12 × 4 image with 1 bit per pixel.

Explanation

A bitmap's pixel data is just a stream of bits, so extra data (metadata) is needed to turn it back into a picture. The width splits the stream into rows and the colour depth splits each row into pixels. Answers that only say 'so it displays properly' do not explain what each value is used for.

Mark scheme
  1. 1 mark

    the width shows how many pixels are in each row // where each row ends (and the next begins) // how to arrange the pixels in a grid

    All marks AO1 (understanding). Do not award both marks for a single statement such as 'so the image can be displayed properly'.

  2. 1 mark

    the colour depth shows how many bits belong to each pixel // where one pixel's code ends and the next begins // how to work out each pixel's colour from the bits

    A. an example showing that the same bits could form different images, e.g. 48 bits could be 6 × 4 pixels at 2 bits each or 12 × 4 pixels at 1 bit each.

Question 3

2 marks

The figure shows a black and white bitmap image in which 0 represents white and 1 represents black. The code for each row is shown in hexadecimal, except for row 4.

State the hexadecimal code for row 4.

Bitmap image drawn as a grid of 8 × 5 pixels (8 wide, 5 high), each pixel white or black. A key gives the binary code of each colour: 0 = white, 1 = black. The pixels, row by row from the top (left to right): row 1: 3 white, 2 black, 3 white; row 2: 2 white, 4 black, 2 white; row 3: white, 6 black, white; row 4: 2 black, white, 2 black, white, 2 black; row 5: 8 black. The hexadecimal code of each row is written beside it: row 1: 18; row 2: 3C; row 3: 7E; row 4: blank box; row 5: FF.

Model answer

Row 4 in binary is 11011011.
1101 = 8 + 4 + 1 = 13 = D
1011 = 8 + 2 + 1 = 11 = B
So the hexadecimal code is DB.

Explanation

First write row 4 as binary (black = 1): 11011011. Then split it into two 4-bit nibbles and convert each to one hexadecimal digit: 1101 is 13 (D) and 1011 is 11 (B). Converting the whole byte to decimal first (219) is allowed as working but is not the answer asked for.

Mark scheme
  1. 1 mark

    D (as the left-hand digit)

    All marks AO2 (apply). Correct answer with no working scores full marks. Row 4 is 11011011: 1101 = D and 1011 = B. Maximum 1 mark if the final answer is not correct.

  2. 1 mark

    B (as the right-hand digit)

    A. DB followed by 'hex' or a subscript 16. R. 11011011 (binary) or 219 (decimal) for either mark.

Question 4

3 marks

Image A is 320 × 240 pixels with a colour depth of 8 bits. Image B is 400 × 300 pixels with a colour depth of 4 bits.

Calculate how many more bytes are needed to store Image A than Image B. Ignore any metadata.

You should show your working.

Model answer

Image A: 320 × 240 × 8 = 614 400 bits = 76 800 bytes
Image B: 400 × 300 × 4 = 480 000 bits = 60 000 bytes
Difference: 76 800 − 60 000 = 16 800 bytes

Explanation

Image B has more pixels (120 000 against 76 800) but half the colour depth, so it is still smaller. Work out each file size with width × height × colour depth, convert to bytes and subtract. Comparing only the numbers of pixels, or giving the difference in bits, are the common mistakes.

Mark scheme
  1. 1 mark

    Image A: 320 × 240 × 8 = 614 400 bits // 76 800 bytes

    All marks AO2 (apply). Correct answer with no working scores full marks. Maximum 2 marks if the final answer is not correct.

  2. 1 mark

    Image B: 400 × 300 × 4 = 480 000 bits // 60 000 bytes

  3. 1 mark

    16 800 (bytes)

    A. working in bits: 614 400 − 480 000 = 134 400 bits, ÷ 8 = 16 800 bytes. A. 16.8 kB. R. 134 400 as the final answer (bits, not bytes).

Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.

Study Helper Hints first, answers after you try

Stuck on this one? Ask for a hint and I’ll point you in the right direction, without giving the answer away. Once you’ve checked your answer, I’ll show you how the marks are awarded.