Question 1 Report
A simple black-and-white icon is to be stored using a bitmap. Each square in the diagram is one pixel. A white pixel is represented by W and a black pixel is represented by B. The icon has a colour depth of 1 bit. A developer proposes using run-length encoding (RLE), writing each row from left to right as a count followed by its colour. For example, three white pixels followed by two black pixels would be written as 3W2B. Each row is encoded separately.
| Row | RLE representation |
|---|---|
| 1 | ................................ |
| 3 | ................................ |
(a) Identify whether this image is a raster graphic or a vector graphic. [1]
(b) State why only 1 bit per pixel is needed for this icon. [2]
(c) Complete the table. [4]
(d) Give one other lossless compression method. [1]
(e) Explain why RLE is likely to be effective for this icon but less effective for a detailed photograph. [3]
(f) Convert the binary pixel value 10110110 to denary. [2]
(g) State one advantage of Unicode over ASCII. [2]
(a) This is a raster graphic [1], because it is represented as a grid of pixels.
(b) The icon has only black and white pixels. One bit has two possible values, 0 and 1, so it can represent the two colours [2].
(c)
| Row | RLE representation |
|---|---|
| 1 | 2W2B2W2B |
| 3 | 4B4W |
Each count describes a consecutive run from left to right [4].
(d) Huffman coding is another lossless compression method [1].
(e) The icon contains long adjacent runs of the same colour, so a count and colour can replace many individual pixel values. A detailed photograph changes colour frequently, producing short runs; RLE then gives little reduction and may even increase data size [3].
(f) \(10110110_2=128+32+16+4+2=\textbf{182}\) [2].
(g) Unicode represents far more characters than ASCII, including characters from many languages and symbols [2].
Everything you need to excel in your exams