When data is sent, a bit can be flipped on the way: a 0 arrives as a 1, or a 1 as a 0. A parity bit is one extra bit added to each group of bits, so the receiver can check whether one has changed.
- Even parity: the parity bit is chosen so the total number of 1s (including the parity bit) is even.
- Odd parity: the parity bit is chosen so the total number of 1s is odd.
The receiver counts the 1s again. If the count no longer matches the rule, at least one bit has changed. Parity can't tell which bit changed, and if two bits flip, the count matches again and the error goes unnoticed.
Simple Parity
You're given 7 data bits and the rule (even or odd). Choose the parity bit, 0 or 1, that makes the count of 1s fit the rule. A right answer scores 10 points and adds 3 seconds; a wrong one costs a life and 5 seconds.
Example, even parity: 1011001 has four 1s, which is already even, so the parity bit is 0. With odd parity it would be 1.
Parity Block
A parity block (a 2D parity check) arranges the data in rows. Each row has a parity bit at its end (the last column), each column has one at its foot (the last row), and the bit in the corner is the parity bit for the parity bits. Check every row and every column against the rule:
- Every row and column fits: accept the block.
- Exactly one row and one column fail: the bit where they cross has flipped. Click it to repair it.
- Anything else (more than one row or column fails): the block can't be repaired, so reject it and ask for it again.
A right decision scores 25 points and adds 5 seconds; a wrong one costs a life and 8 seconds. After each answer, a ✓ or ✗ beside every row and under every column shows which passed.
You start with 60 seconds and 5 lives. The game ends when either runs out.
Objective: explain how a parity bit (even or odd) detects an error in transmission, work out a parity bit, and use a parity block to find and correct a single flipped bit (for example, Cambridge IGCSE Computer Science 0478, 2.2 methods of error detection).
Where this fits
- AQA: AQA A Level Computer Science (7517) Goes beyond AQA A Level Computer Science (7517): Parity blocks (finding and fixing the flipped bit) go beyond AQA's parity bits.
- Cambridge: Cambridge IGCSE Computer Science (0478); Cambridge A Level Computer Science (9618); Cambridge AS Level Computer Science (9618)