Error Detection
Data Transmission · 4 question types
Exam Frequency Analysis
Past paper frequency (2018 to 2024)
This topic accounts for approximately 5% of your exam marks.
Parity bits, checksums and check digits each appear in most papers. Often 3 to 4 marks.
A parity check detects errors by adding a single extra bit (the ) to each byte so that the total number of 1s in the byte follows an agreed pattern.
The sender and receiver agree in advance whether they will use or odd parity:
- Even parity: the total number of 1s in the byte (including the parity bit) must be even.
- Odd parity: the total number of 1s in the byte (including the parity bit) must be odd.

Setting the parity bit
To set the parity bit, the sender:
- Counts the 1s in the 7 data bits.
- If the count already matches the agreed parity, sets the parity bit to 0.
- If the count is the wrong parity, sets the parity bit to 1 to flip the total.
How the receiver detects an error
The receiver:
- Counts the 1s in every received byte.
- Checks whether the count matches the agreed parity.
- If yes, no error has been detected.
- If no, an error has occurred (and the data should be discarded or re-sent).
Setting a parity bit and checking for an error
A sender and receiver have agreed to use odd parity. The sender wants to transmit the 7-bit data value 1 0 1 1 0 0 1. What parity bit must be added, and how does the receiver spot an error if one bit flips in transit?
Solution:
Setting the parity bit (sender side)
- Count the 1s in the 7 data bits: 1, 0, 1, 1, 0, 0, 1 → four 1s (an even count).
- Odd parity requires the total to be odd, so the count must become 5.
- Set the parity bit to 1; transmitted byte: 1 1 0 1 1 0 0 1 (parity bit first).
Checking on arrival (receiver side — correct byte)
- Received byte: 1 1 0 1 1 0 0 1 → count the 1s → 5 (odd). Parity matches. No error detected.
Checking on arrival (receiver side — one bit corrupted)
- Suppose bit 3 flips: received byte becomes 1 1 0 0 1 0 0 1 → count the 1s → 4 (even).
- The total is even but odd parity is expected → error detected; data should be rejected or re-requested.
Limitations of a single parity bit
Parity checks are cheap and quick but they cannot detect every error:
- Two bits flipped in the same byte cancel each other out and the parity still matches.
- A whole even-numbered group of bit flips also leaves the parity unchanged.
- Bit transposition (two bits swapping positions) does not change the parity at all.
- The parity check tells you whether an error has happened, but not which bit is wrong.
For better protection, the bytes are arranged into a parity block with an extra parity byte, described next.
State a limitation of a parity check
What comes up: questions ask you to state one (or two) limitations of a parity check — why it cannot always detect an error.
Write (one mark per point): (1) If an even number of bits change during transmission (for example, two bits flip), the total count of 1s shifts by two and the parity appears unchanged, so the error goes undetected. (2) A parity check can only tell you that an error has occurred; it cannot identify which bit is wrong.
Watch out: the check works for an odd number of changed bits, so one flipped bit is always caught. The common slip is saying parity "cannot detect any errors" — it cannot detect an even number of errors, not all errors.