SLIDE 1 / 10
CSZone.co.uk
Click anywhere to advance · Arrow keys also work
AQA 7517 · Paper 2 · 4.5.4b

Parity Bits &
Check Digits

Error detection in data transmission · Section 4.5

WHAT YOU'LL LEARN
Even/odd parity · Parity worked examples · Check digits (EAN, ISBN) · Limitations
AQA SPEC LINK
4.5.4 — Error detection: parity bits, check digits
Why Error Detection?

Data Errors During Transmission

When data is transmitted (over networks, USB, etc.) individual bits can flip from 0 to 1 or 1 to 0 due to electrical interference, signal degradation, or hardware faults.
Sent: 0100 0001 (letter A)
Received: 0100 0011 (letter C) — bit 1 flipped!
Without error checking, the corruption goes undetected
Parity bits and check digits help detect (but not always correct) such errors
Parity Bits

Even & Odd Parity

EVEN PARITY
A parity bit is added so the total number of 1s in the byte (including parity bit) is even.
ODD PARITY
A parity bit is added so the total number of 1s is odd.
The parity bit is typically the most significant bit (leftmost). Both sender and receiver must agree on which system to use.
Worked Example

Calculating Parity Bits

Example: Data = 1001011 (even parity)
Count 1s in data: 1,0,0,1,0,1,1 → four 1s
Four is already even → parity bit = 0
Full byte: 01001011
Example: Data = 1011010 (even parity)
Count 1s: 1,0,1,1,0,1,0 → four... wait, that's even → parity bit = 0
Actually: 1+0+1+1+0+1+0 = 4 ones → parity bit = 0
Error Detection

How Parity Detects Errors

Sent (even parity): 01001011 → 4 ones (even ✓)
Received: 01101011 → 5 ones (odd ✗)
Error detected! The receiver knows corruption occurred.
Limitation: If TWO bits flip, the parity count stays even — the error is not detected. Parity cannot correct errors, only detect (some) of them.
Check Digits

Check Digits on Barcodes

A check digit is a digit added to the end of a code (barcode, ISBN, bank sort code) to help detect keying or scanning errors
ISBN-13 (books) and EAN-13 (products) use the same check digit scheme
Calculated from the other digits using a mathematical formula
If a digit is mis-scanned, the check digit won't match — error detected
EAN-13 Example

EAN-13 Check Digit Calculation

EAN-13: digits 1–12 alternate ×1 and ×3 weighting
Sum the products, then: check digit = (10 − (sum mod 10)) mod 10
Example first 12 digits: 500012345678
5×1 + 0×3 + 0×1 + 0×3 + 1×1 + 2×3 + 3×1 + 4×3 + 5×1 + 6×3 + 7×1 + 8×3
= 5+0+0+0+1+6+3+12+5+18+7+24 = 81
Check digit = (10 − (81 mod 10)) mod 10 = (10 − 1) mod 10 = 9
Comparison

Parity vs Check Digits

FeatureParity BitCheck Digit
Used forBinary data transmissionNumeric codes (barcodes, ISBNs)
Added value1 bit (0 or 1)Single digit (0–9)
DetectsSingle-bit flipTranspositions, single errors
Corrects?NoNo
AQA Exam Style

Practice Question

AQA 7517 — Paper 2 Style
(a) A computer uses even parity. Data byte (excluding parity) is 1010011. State the parity bit and give the complete 8-bit byte transmitted. [2]
(b) The byte 01011010 is received. Using even parity, determine whether an error occurred. Show your working. [2]
(c) Give ONE limitation of using parity bits for error detection. [1]
[5 marks]
2 marks
(a) 1s in 1010011 = four (even) → parity bit = 0. Full byte: 01010011
2 marks
(b) Count 1s: 0,1,0,1,1,0,1,0 = 4 ones. Four is even → no error detected [1]; byte appears valid [1]
1 mark
(c) If two bits flip the parity is still even so the error is undetected / parity cannot locate or correct errors
Summary

Key Points to Remember

Even parity — parity bit chosen so total 1s (including it) is even
Odd parity — parity bit chosen so total 1s is odd
Parity limitation — can't detect even-numbered bit flips; can't correct errors
Check digits — appended to barcodes/ISBNs; detect transcription and scanning errors
Neither parity bits nor check digits can correct errors — see Hamming codes for correction
🎉 Lesson complete — move to the quiz!