Skip to content

Course home

Data compression

Data compression

EasyMedium
123456789101112131415161718192021222324
Question 20

A black and white image has been compressed using run-length encoding (RLE).

Each run of pixels is encoded using a single byte (8 bits):

  • The first bit of each byte represents the colour: 0 for black, 1 for white.
  • The remaining seven bits represent the number of pixels in that run.

Figure 1 shows the bit pattern representing a run of 40 black pixels followed by a run of 75 white pixels.

Figure 1

0010100011001011

Using the same RLE method, give the 16-bit pattern for a run of 18 white pixels followed by a run of 85 black pixels.

Write your answer in Table 1.

Table 1

[2]
Markscheme

Data compression Questions

  1. GCSE
  2. /Computer Science
  3. /Data compression

37 exam-style questions on AQA GCSE Computer Science Data compression. Each one has a worked solution and a mark scheme showing where the marks go.

Question bank