4Medium
0/3

An environmental monitoring station records sensor status codes. To save bandwidth during transmission, these records are compressed using Run-Length Encoding (RLE).

Each RLE data packet consists of two parts:

  • The first 3 bits represent the sensor status code.
  • The next 4 bits represent the run length in binary (e.g. a run length of 1 is encoded as 0001 and a run length of 6 is encoded as 0110).

The data is processed sequentially from the start of Window A to the end of Window B, and the encoding is continuous between windows (meaning if the same status occurs at the end of Window A and the start of Window B, they merge into a single run).

Below is the visual log of the 16 sequential status readings recorded across Window A and Window B:

Environmental sensor status log

Status Code Table:

StatusLabelBinary Code
Green (Normal)G010
Orange (Warning)O101
Red (Critical)R011

Convert the sequence of 16 status readings across both windows into a continuous binary stream using the specified RLE compression method.

[3]

Data storage and compression Questions

Practise Edexcel GCSE Computer Science Data storage and compression with exam-style questions for GCSE Computer Science. 50 questions covering Binary multiples and file size calculations and Need for and methods of compression, matched to the Edexcel GCSE Computer Science (1CP2) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.

PreviousNext

Data storage and compression Questions

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