Error Detection
When data is sent over a network or read from a disk, it can be corrupted. CIE 0478 examines four detection techniques in detail. This topic is unique to CIE; OCR, AQA and Edexcel do not require this depth.
In 1990 a single flipped bit in a satellite signal sent the wrong launch coordinates to a weather rocket. Tiny corruption, huge consequences. Networks today carry trillions of bits per second; without error detection we would never trust a download, a bank transfer or even a text message.
Parity bits
A parity bit is one extra bit added to each byte. With even parity, the total number of 1s in the byte (including the parity bit) must be even.
Data byte: 1010100 # four 1s Parity bit: 0 # total still four (even) Transmitted: 10101000 Data byte: 1010101 # four 1s Parity bit: 1 # total five, but with parity = 1, total six (even) Transmitted: 10101011
Parity catches a single flipped bit. If two bits flip, the parity is unchanged and the error slips through undetected.
Checksums and check digits
Checksum: the sender adds up the bytes (often modulo 256) and sends the total alongside. The receiver recalculates and compares. If the totals differ, the data is corrupted.
Check digit: a single digit on the end of a number that is derived from the other digits. Used on ISBNs, barcodes and bank account numbers. Catches typing mistakes including transposed digits.
ISBN: 978-0-13-468599-? Apply weighted sum (alternating x1, x3) to the 12 digits. Take result mod 10. The check digit is the value that makes the total a multiple of 10.
Automatic Repeat Request (ARQ)
ARQ uses acknowledgements and timeouts to guarantee delivery.
- Sender transmits a packet and starts a timer.
- Receiver checks the packet (using a checksum or parity).
- If the packet is intact, the receiver sends back a positive acknowledgement (ACK).
- If the timer runs out before the sender gets an ACK, it resends the packet.
ARQ is what stops a single dropped packet from corrupting a whole file download.
Beyond the basics
Two valid reasons for rejection:
1. The barcode was misread by the scanner (a digit picked up wrongly), so the recalculated check digit no longer matches.
2. The barcode is genuinely incorrect: a counterfeit label, a printing error, or a typo when the parcel was registered. The check digit is doing its job by catching this before the wrong item leaves the warehouse.
The check digit cannot tell the system which of these two cases applies, only that something is wrong. The driver should rescan and, if it still fails, the parcel should be inspected by a human.
All four error-detection methods at a glance
| Method | Where used | Detects | Limitation |
|---|---|---|---|
| Parity bit | Memory, simple data transmission | Any single-bit flip in a byte | Misses double-bit errors (two flips cancel out) |
| Checksum | Network packets, file downloads | Most accidental corruption of a block of data | Slower to compute; deliberate tampering can fake the same checksum |
| Check digit | Barcodes, ISBNs, bank account numbers | Single-digit typos and most pair-swaps | Only protects the very end of a number, not the data itself |
| ARQ | Wi-Fi, TCP, satellite links | Lost or corrupted packets (when paired with a checksum) | Adds delay; needs an acknowledgement channel back |
Parity only detects that something has gone wrong. It does not say which bit flipped, so it cannot put the data back. Correction needs much more redundancy (e.g. Hamming codes), which is beyond the GCSE specification. In an exam, never write "parity corrects errors" - you will lose the mark.
A six-mark exam question with mark scheme
Question (CIE-style, 6 marks): Describe how a parity bit and Automatic Repeat Request (ARQ) work together to ensure data is transmitted accurately between two computers.
- Before sending, the sender counts the 1s in each byte.
- A parity bit is added to make the total number of 1s match the agreed parity (odd or even).
- The receiver counts the 1s on arrival and compares against the agreed parity.
- If the count is wrong, the byte has been corrupted in transit.
- Under ARQ, the receiver sends a positive acknowledgement when data arrives intact.
- If the sender does not receive an acknowledgement within a timeout, it re-transmits the data.
- This process repeats until the data is received correctly or a maximum number of attempts is reached.