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 i...

Assessment: Computer Science 4CP0 | Paper 1 Mock 01 | Written Paper 1 Subject: Computer Science - 4CP0

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 1Row 2Row 3Row 4© EAGLE BEACON GLOBAL
RowRLE 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]

Answer Details

(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)

RowRLE representation
12W2B2W2B
34B4W

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].

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning