Error Detection & Correction

💻 Computer Science Years 10–11 Higher

Spotting and fixing transmission errors with parity, parity blocks, checksums, echo checks, check digits and ARQ.

Open this lesson, with practice and a printable worksheet →

Wires are noisy places. A spike of electrical interference can flip a single bit — turning a 0 into a 1 — and now the balance you sent as £100 arrives as £228. Computers cannot stop errors happening, but they can be clever enough to notice that something changed, and sometimes even work out which bit changed. That is the job of error detection and correction.

Why this matters: Reliable transmission underpins banking, medicine and every download. Cambridge (Extended) expects you to calculate parity bits, find a faulty bit in a parity block, and describe checksum, echo check, check digit and ARQ.
byte 1byte 2byte 3byte 41 0 1 10 1 1 01 1 0 10 1 1 0column parity fails here ↓← row parity failsparity: even expectedthe wrong bit sits where the bad row meets the bad column
A parity block: the faulty bit is pinpointed where the failing row crosses the failing column.

Parity bit (even or odd)

A byte is given one extra parity bit. Under even parity the total number of 1s (including the parity bit) must be even; under odd parity it must be odd. The sender sets the parity bit to make the count match; the receiver recounts. If the count is wrong, an error is detected.

Seven data bitsNumber of 1sEven-parity bitByte sent
01101003 (odd)110110100
10011014 (even)001001101

In the first row there are three 1s, which is odd, so the even-parity bit must be 1 to make four 1s in total (even). In the second row there are already four 1s, so the parity bit is 0.

Parity block check

Bytes are stacked in a block, with a parity bit on every row and an extra parity byte at the bottom giving the parity of every column. A single flipped bit makes exactly one row and one column fail their parity — and the bit at that crossing point is the culprit, so it can be corrected, not just detected.

Other methods

Sendercalc checksumdata + checksumReceiverrecalculatematch → data OK    mismatch → error, resend
Checksum: the receiver recalculates and compares; a mismatch means the data was corrupted.
Worked example (Calculate, 2 marks): The seven data bits 0110100 are sent using even parity. State the parity bit and the full byte.
Count the 1s: 0,1,1,0,1,0,0 has three 1s (odd). Even parity needs an even total, so the parity bit must be 1 (making four 1s). If the parity bit is placed on the left: 1 0110100 → byte 10110100.
Common mistake: A single parity bit only detects an odd number of flipped bits — if two bits flip, the parity can still look correct, so the error is missed. That is why parity blocks and checksums are stronger.

Memory hook: "Row meets column" pinpoints the bad bit in a parity block. And ARQ = Ask to Resend, Quickly.

Get the printable worksheet →
← Data Transmission → Logic Gates & Circuits
← Sasta Basta home All subjects