A digital graphic designer is creating sprite sheets for a retro-style video game. Each sprite is an image with a resolution of 12×12 12 \times 12\,12×12 pixels.
The sprite palette maps four active colors to a 4-bit color depth:
| Color | Binary Code |
|---|---|
| Red | 0001 |
| Blue | 0010 |
| Green | 0100 |
| Yellow | 1100 |
An RLE (Run-Length Encoding) algorithm is used to compress these sprites. The RLE algorithm uses 8 bits to represent the run-length (frequency) of a pixel and 4 bits to represent the color code.
Construct an expression to show the maximum saving in bits that could be made by compressing a single 12×12 12 \times 12\,12×12 sprite using this RLE algorithm.
47 exam-style questions on Edexcel GCSE Computer Science Data storage and compression, covering Binary multiples and file size calculations and Need for and methods of compression. Each one has a worked solution and a mark scheme showing where the marks go.