Revision Notes
OxfordAQA A-Level Computer Science (9645): Error detection and correction – Revision Notes
Recall notes for OxfordAQA 9645 sub-topic 3.5.8: parity bits, majority voting, checksums, how they compare and a self-test with answers.
- Subject
- Computer Science
- Level
- AS LEVEL
- Topic
- Topic 5 – Representing data
- Author
- Marlbridge Academic Team
- Updated
- Reviewed by
- Harris Khan (what this means)
Aligned to OxfordAQA A Level Computer Science (9645), 2024-onwards. Official specification .
Syllabus page (what it covers and how it is assessed): OxfordAQA A Level Computer Science.
Syllabus points this page covers
9645 (AS Level)
- 3.5.8 Error detection and correction
This page covers 1 of the 8 subtopics in topic 5, Representing data.
Found an error? Report a correction.
Need help with this topic? Request a free trial class for A Level Computer Science (9645).
These notes condense sub-topic 3.5.8 Error detection and correction of OxfordAQA International AS and A-level Computer Science (9645), Version 1.1 (AS content in topic 3.5 Representing data). For longer worked examples, see the error detection and correction study guide; then practise with the error detection and correction practice questions.
What the specification requires
- Describe and explain the use of parity bits, majority voting and checksums.
- Compare the use and effectiveness of the three methods.
Key terms
| Term | Meaning |
|---|---|
| Error detection | Finding out that data has been corrupted |
| Error correction | Working out what the data should have been |
| Parity bit | An extra bit that makes the number of 1s even (even parity) or odd (odd parity) |
| Majority voting | Sending each bit several times and taking the value that occurs most often |
| Checksum | A value calculated from a block of data, sent with it and recalculated to compare |
| Redundancy | Extra data added only to help detect or correct errors |
Parity bits
Even parity: the total number of 1s, including the parity bit, is even. Odd parity: the total is odd.
Recomputed (parity bit added on the right):
| Data | 1s | Even parity bit | Odd parity bit |
|---|---|---|---|
| 0101101 | 4 | 0 | 1 |
| 1100001 | 3 | 1 | 0 |
| 1110110 | 5 | 1 | 0 |
| 0001000 | 1 | 1 | 0 |
Checking (even parity). Count the 1s in the received byte. Even means no error detected; odd means an error.
| Received byte | 1s | Result |
|---|---|---|
| 11010110 | 5 | Error detected |
| 01100110 | 4 | No error detected |
| 10011111 | 6 | No error detected |
Properties:
- Detects any single-bit error (and any odd number of errors).
- Misses an even number of errors (two flips cancel in the count).
- Cannot say which bit is wrong, so cannot correct.
- Overhead: 1 extra bit per group (about 14% for 7 data bits).
Majority voting
Send each bit three times. The receiver takes the majority of each group of three.
| Data | Sent |
|---|---|
| 0110 | 000111111000 |
| 1001 | 111000000111 |
Decoding:
| Received | Groups | Result |
|---|---|---|
| 110011100111 | 110, 011, 100, 111 | 1, 1, 0, 1: 1101 |
| 101001110000 | 101, 001, 110, 000 | 1, 0, 1, 0: 1010 |
Properties:
- Corrects one error in each group of three.
- Fails if two bits in the same group are wrong (it silently gives the wrong bit).
- Inefficient: 200% extra data. A 40-bit message becomes 120 bits, so 80 bits are redundant.
- Useful when re-sending is impractical.
Checksums
- The sender calculates a value from the data using an agreed method.
- The value is sent with the data.
- The receiver recalculates the value and compares.
- A mismatch means an error; the data is normally re-sent.
Simple example: add the byte values and take the remainder after dividing by 256.
| Data bytes | Sum | Checksum |
|---|---|---|
| 12, 45, 200, 17 | 274 | 18 |
| 80, 83, 19, 250 | 432 | 176 |
| 255, 255, 2 | 512 | 0 |
| 72, 101, 108, 108, 111 | 500 | 244 |
Properties:
- Low overhead on large blocks (one byte or a few bytes).
- Detects most errors, including several flipped bits.
- Not guaranteed: swapped bytes or errors that cancel can give the same sum. For 34, 17, 250, 9 (checksum 54), the swapped data 17, 34, 250, 9 also gives 54.
- Detects but does not correct.
Comparison
| Parity | Majority voting | Checksum | |
|---|---|---|---|
| Detects | Yes, single (odd number) | Yes | Yes |
| Corrects | No | Yes (within limits) | No |
| Overhead | Low per group | Very high (200%) | Very low per block |
| Weakness | Even number of errors missed | Two errors in a group give wrong data | Some patterns (swaps) missed |
| Best for | Small groups; fast checks | Cases where re-sending is hard | Large blocks and files |
Choosing a method
| Situation | Sensible choice | Reason |
|---|---|---|
| Short byte sent over a reliable link | Parity bit | Very small overhead |
| A signal from a distant probe | Majority voting | Re-sending takes too long, so correction is valuable |
| A large file download | Checksum | Few bytes of overhead for a whole file |
If a parity check or checksum fails, the data is normally requested again. Majority voting avoids re-sending but costs three times the data.
Exam traps
- Parity cannot correct. It only detects.
- Two flipped bits can slip past a parity check.
- Majority voting needs every bit repeated, so it multiplies the data by three.
- A checksum is sent with the data and compared after recalculation.
- Match the parity rule. Check whether the question asks for even or odd.
- Explain the failure case of each method; it is a common mark.
- Detection leads to re-sending. Only correction avoids it.
Quick self-test
- What is the difference between detecting and correcting an error?
- Give the even parity bit for 0101101.
- Give the odd parity bit for 1100001.
- A byte 11010110 is received using even parity. Is an error detected?
- Why can a parity bit not correct an error?
- Name a case when parity fails to detect errors.
- Encode 0110 using majority voting with three copies.
- Decode 110011100111.
- What is the overhead of three-copy majority voting?
- What is a checksum?
- Calculate the checksum (sum mod 256) for 12, 45, 200, 17.
- Give one weakness of a simple additive checksum.
Answers
- Detecting finds that there is an error; correcting also finds what the data should be.
-
-
- Yes; there are five 1s, which is odd.
- It does not show which bit is wrong.
- When an even number of bits are flipped.
- 000111111000.
-
- 200% extra data (three times as much sent).
- A value calculated from a block of data, sent with it and recalculated to compare.
- 274 mod 256 = 18.
- Swapped bytes, or errors that cancel, can give the same sum.
- Error detection and correction study guide
- Error detection and correction practice questions
- Basic encryption methods revision notes
Official syllabus
OxfordAQA International AS and A-level Computer Science (9645) specification, Version 1.1, for International AS exams May/June 2025 onwards and International A-level exams May/June 2026 onwards: sub-topic 3.5.8 Error detection and correction.
Related resources
-
Study guides
OxfordAQA A-Level Computer Science (9645): Number bases
OxfordAQA 9645 sub-topic 3.5.1 in depth: decimal, binary and hexadecimal place values and step-by-step conversions between all three bases.
Computer Science · OxfordAQA · AS Level
Read guide -
Practice questions
OxfordAQA A-Level Computer Science (9645): Number bases – Practice Questions
Twelve original OxfordAQA 9645 questions on sub-topic 3.5.1 Number bases: converting between decimal, binary and hexadecimal, with full working.
Computer Science · OxfordAQA · AS Level
Try questions -
Revision notes
OxfordAQA A-Level Computer Science (9645): Number bases – Revision Notes
Recall notes for OxfordAQA 9645 sub-topic 3.5.1 Number bases: decimal, binary and hexadecimal, conversion methods, worked checks and a self-test.
Computer Science · OxfordAQA · AS Level
Revise topic
Get free revision emails (optional)
Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.