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 check digit is an extra digit appended at the right-hand side of a numerical code, computed from the other digits via an agreed algorithm, so that the receiver can spot data-entry errors.
Check digits are different from the methods above: they protect against errors in numerical data entry by humans, not against transmission errors. The same maths is used, but the use case is different.
Typical errors that check digits catch:
- Single-digit error: a wrong digit was typed (e.g. 7 instead of 1).
- Transposition error: two adjacent digits were swapped (e.g. 21 instead of 12).
- Omitted or extra digits: a digit was missed out or one was added by mistake.
- Phonetic errors: confusion between digits that sound similar over the phone (e.g. 13 vs 30).
How a check digit works
- The other digits in the number are run through the check-digit algorithm.
- The algorithm produces a single digit.
- This digit is appended to the end of the number.
- Whenever the number is entered or scanned later, the algorithm is re-run on the digits and the result is compared with the final digit.
- If they match, the number is treated as valid. If not, the number is rejected.
Common uses of check digits
- ISBN-10 book identifiers: every printed book carries a 10-digit ISBN whose final digit is a check digit. An ISBN-10 is valid if (1 × digit₁ + 2 × digit₂ + … + 10 × digit₁₀) is divisible by 11.
- Barcodes (EAN-13, 13 digits; UPC-A, 12 digits): product codes used on supermarket items, ending in a check digit. The barcode scanner re-calculates the check digit from the bars it has read; if the calculated digit does not match the printed one, the scanner refuses the read and beeps for a retry.
- Bank card numbers (Luhn check)
- National identity numbers in many countries
- Vehicle Identification Numbers (VINs) on cars
Explain how a barcode scanner uses a check digit
What comes up: a 4-mark "explain how" question on how a check digit is used when scanning a barcode.
Write (four marks): (1) A check digit is calculated from the other digits in the barcode using an agreed algorithm. (2) The check digit is stored as the final digit of the barcode. (3) When the barcode is scanned, the check digit is recalculated from the scanned digits using the same algorithm. (4) If the newly calculated digit does not match the stored check digit, an error has occurred during the scan.
Watch out: the mark scheme credits the recalculation step separately from the comparison step — do not merge them into one sentence or you will lose a mark.