Skip to main content
EnglandComputer ScienceSyllabus dot point

How is data compressed, encrypted and checked for errors?

Understand lossy and lossless compression, run length encoding and dictionary-based compression, symmetric and asymmetric encryption, and error-checking methods such as parity and check digits.

A focused answer to AQA A-Level Computer Science 4.5.12 to 4.5.14, covering lossy and lossless compression, run length encoding and dictionary-based compression, symmetric and asymmetric encryption, and error checking with parity and check digits.

Generated by Claude Opus 4.89 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. Lossless and lossy compression
  3. Lossless techniques
  4. Symmetric and asymmetric encryption
  5. Error checking

What this dot point is asking

AQA wants you to distinguish lossy and lossless compression, describe run length encoding and dictionary-based compression, explain symmetric and asymmetric encryption, and describe error-checking methods such as parity and check digits.

Lossless and lossy compression

The choice depends on the data and its use. JPEG photos and MP3 audio use lossy compression because the eye and ear tolerate small losses and the size savings are large. A program executable, a spreadsheet or a legal document must use lossless compression (such as ZIP) because every byte matters.

Lossless techniques

Symmetric and asymmetric encryption

Error checking

A parity bit is an extra bit added so that the total number of 1s is even (even parity) or odd (odd parity); if the received parity is wrong, an error is detected, though it cannot fix it or catch an even number of flipped bits. A check digit is an extra digit calculated from the others (as on barcodes and ISBNs); recalculating it on input detects transcription errors such as a swapped or mistyped digit. A checksum combines the data into a single value that is recomputed after transmission and compared.

Exam-style practice questions

Practice questions written in the style of AQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

AQA 20194 marksA black and white scanned document is stored as a bitmap. Explain why run length encoding is a suitable lossless compression method for this image, and describe one type of image for which run length encoding would be a poor choice.
Show worked answer →

Run length encoding replaces a run of identical adjacent values with the value and a count, so a row such as 40 white pixels then 5 black pixels is stored as two pairs rather than 45 separate values. A scanned black and white document has large areas of a single colour (long runs), so RLE achieves a high compression ratio while remaining lossless, meaning the exact original is restored.

RLE is a poor choice for a photograph, where colour changes from pixel to pixel and runs are short or non-existent; the value and count pairs can then be larger than the original data, so the file grows rather than shrinks.

Markers reward explaining how RLE encodes runs, linking it to the long runs in a document, and a valid counter-example (a photograph or noisy image) with the reason.

AQA 20215 marksCompare symmetric and asymmetric encryption. In your answer, explain the key used in each, the main security weakness of symmetric encryption, and how asymmetric encryption addresses it.
Show worked answer →

Symmetric encryption uses a single shared secret key for both encryption and decryption. It is computationally fast, but its weakness is key distribution: the same key must reach the recipient securely, and if it is intercepted in transit the message can be read.

Asymmetric encryption uses a key pair, a public key and a private key. The public key can be published openly and is used to encrypt; only the matching private key, never transmitted, can decrypt. This removes the need to share a secret in advance, solving the distribution problem, and also enables digital signatures. Its disadvantage is that it is slower, so real systems often use asymmetric encryption to exchange a symmetric session key, then switch to the faster symmetric cipher.

Markers reward identifying one key versus a key pair, the distribution weakness of symmetric, and how a public/private pair removes the need to share a secret.

Related dot points

Sources & how we know this