Why Data Needs Checking
When data is transmitted, it travels as electrical, light or radio signals — and those signals can be disturbed.
Interference, such as electrical noise from nearby equipment, can damage the signal on the way. When that happens, the data that arrives is not the data that was sent. The syllabus names three kinds of error:
| Error | What happens | Example (sent 01001101) |
|---|---|---|
| Data loss | Some bits go missing | 0100110 |
| Data gain | Extra bits appear | 010011011 |
| Data change | Some bits are flipped (0 becomes 1, or 1 becomes 0) | 01001111 |
The receiver cannot see the original data, so it needs a way to tell whether what arrived is correct. That is what error detection methods do. Once an error is detected, the usual fix is simple: ask for the data to be sent again.
Five Methods, Two Situations
Four of these methods are concerned with data transmission: parity checks, checksums and echo checks help detect errors, while ARQ arranges retransmission when needed. The fifth method, the check digit, is used to detect data entry errors.
| Method | Checks | In one line |
|---|---|---|
| Parity check | Transmission | Counts the 1s in each byte |
| Checksum | Transmission | Compares a value calculated from a block of data |
| Echo check | Transmission | Sends the data back to be compared |
| ARQ | Transmission | Uses acknowledgements and timeouts to get data resent |
| Check digit | Data entry | A final digit calculated from the other digits |
Where This Fits in the Syllabus
Cambridge IGCSE Computer Science (0478, 2026–2028) section 2.2 asks you to:
- understand the need to check for errors after transmission and how errors occur (interference: data loss, gain and change)
- describe parity checks (odd and even), including the parity byte and parity block check, the checksum and the echo check
- describe how a check digit detects data entry errors, with examples including ISBNs and barcodes
- describe how an automatic repeat query (ARQ) uses positive and negative acknowledgements and a timeout
The command word is usually describe: give the steps of the process in order, not just the name of the method.
Check Your Understanding 1
Name the three types of error that can be caused by interference during transmission.
Check the answer
Data loss, data gain and data change.
Parity Checks — Counting the 1s Syllabus
In a parity check, one bit of each byte is used as the parity bit, and the other seven bits are data. In the examples here, the parity bit is the left-most bit, and bits are numbered from the left starting at the parity bit. The sender and receiver agree in advance whether they are using even or odd parity.
| Parity | Rule |
|---|---|
| Even parity | The total number of 1s in the byte, including the parity bit, must be even |
| Odd parity | The total number of 1s in the byte, including the parity bit, must be odd |
Worked example: adding a parity bit
The seven data bits 1001101 contain four 1s. Here the parity bit is placed at the left-hand end of the byte.
Even parity: four is already even → parity bit 0 → 01001101
Odd parity: need one more 1 → parity bit 1 → 11001101
Worked example: detecting the error
Using even parity, the sender transmits 01001101. Interference flips one bit, and the receiver gets 01001111.
Even parity expected → error detected → request the byte again
The limits of a single parity bit
- It cannot find the bit. It shows that the byte is wrong, but not which bit changed.
- It misses an even number of errors. If two bits flip, the count of 1s stays even (or odd), so the error goes unnoticed.
Received: 01111101 (bits 3 and 4 flipped → six 1s, still even)
Parity check passes → error NOT detected
Check Your Understanding 2
A system uses even parity. The byte 10110110 is received. Has an error been detected? Explain.
Reveal the answer
Yes. The byte contains five 1s, which is odd. With even parity, the number of 1s should be even, so an error has been detected.
Parity Bytes and Parity Block Checks Syllabus
A parity block check goes further. Several bytes are sent together as a block. Each byte has its own parity bit (checking the row), and an extra parity byte is added at the end, in which each bit is the parity bit for its column.
Here is a block of four bytes using even parity. The first bit of each byte is its parity bit.
| Row | Parity bit | Bit 2 | Bit 3 | Bit 4 | Bit 5 | Bit 6 | Bit 7 | Bit 8 |
|---|---|---|---|---|---|---|---|---|
| Byte 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| Byte 2 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| Byte 3 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 |
| Byte 4 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| Parity byte | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
Every row and every column contains an even number of 1s. Now suppose interference flips one bit, and byte 3 arrives as 11111000 instead of 11110000.
- Byte 3 now has five 1s — its row fails the parity check.
- Bit 5's column now has an odd number of 1s — that column fails too.
- The faulty bit is where the failing row and column meet: byte 3, bit 5.
Because the faulty bit has been located, the receiver can even correct it by flipping it back. This only works when a single bit is wrong. A parity block still has limits: some combinations of several errors can cancel out and go undetected, and others can be detected but not located.
Check Your Understanding 3
In a parity block check, which two things together identify the position of a single incorrect bit?
Reveal the answer
The row (the byte whose parity bit fails) and the column (the bit position that fails in the parity byte check). The incorrect bit is where they cross.
Checksum — Comparing a Calculated Value Syllabus
A checksum checks a whole block of data at once, using a value calculated from that data.
| Step | What happens |
|---|---|
| 1 | Before sending, the sender uses an agreed algorithm to calculate a value — the checksum — from the data. |
| 2 | The checksum is sent along with the block of data. |
| 3 | The receiver uses the same algorithm to recalculate the checksum from the data it received. |
| 4 | The two checksums are compared. If they match, the data is accepted. If they are different, an error has occurred and the data is requested again. |
Worked example
Different systems use different, more complex algorithms. Here is a simplified example for learning only: add the byte values together, and if the total is more than 255, keep only the remainder after dividing by 256.
Total = 455 → 455 ÷ 256 = 1 remainder 199 → checksum 199
Data received: 150, 200, 76, 30
Total = 456 → 456 ÷ 256 = 1 remainder 200
200 ≠ 199 → error detected → request the data again
Limitation: some errors can cancel each other out. If one value went up by 1 and another went down by 1, the total — and so the checksum — would not change, and the error would be missed. A matching checksum therefore shows that no error was detected, not that the data is certainly correct.
Echo Check — Sending the Data Back Syllabus
An echo check works like repeating a phone number back to the person who told you it.
- The sender transmits the data.
- The receiver sends a copy of the data it received back to the sender.
- The sender compares the returned copy with the original.
- If they match, the data is assumed to have arrived correctly. If not, an error has occurred and the data is sent again.
Sender ◀── copy ── Receiver
Sender compares copy with original
Drawbacks: the data travels twice, so it doubles the amount of transmission. And if the copies do not match, the sender cannot tell whether the error happened on the way there or on the way back — the original may have arrived perfectly.
The receiver only sends the data back. It is the sender that compares the copy with the original.
ARQ — Acknowledgements and Timeouts Syllabus
An automatic repeat query (ARQ) — often also called an automatic repeat request — makes sure data is received without error. It works alongside an error-detection method, such as a checksum, and uses messages called acknowledgements and a time limit called a timeout.
Keep the two jobs separate. An error-detection method, such as a parity check or checksum, finds out whether the data arrived damaged. ARQ does not detect errors itself: it uses the result of that check, the acknowledgements and the timeout to arrange for the data to be sent again when needed.
| Step | What happens in ARQ |
|---|---|
| 1 | The sender transmits the data and starts a timer. |
| 2 | The receiver checks the data for errors. |
| 3 | If no error is detected, the receiver sends a positive acknowledgement back to the sender, showing that the data was received successfully. |
| 4 | If an error is detected, the receiver sends a negative acknowledgement, showing that the transmission was unsuccessful, and the sender transmits the data again. |
| 5 | If the sender receives no acknowledgement before the timeout runs out, it automatically sends the data again. |
| 6 | This continues until a positive acknowledgement is received (or a set number of attempts has been made). |
↓
Receiver checks the data
↓
✓ correct → positive acknowledgement → done
✗ error → negative acknowledgement → send again
⏱ nothing back before timeout → send again
Why is the timeout needed?
Sometimes the data — or the acknowledgement itself — is lost completely. Without a timeout, the sender would wait forever for a reply that is never coming. The timeout means it gives up waiting and resends.
Check Your Understanding 4
In ARQ, what does the sender do if it receives no acknowledgement before the timeout?
Reveal the answer
It automatically resends the data.
The methods so far check data on its journey. Check digits check something different: numbers that people type in or devices scan.
Check Digits — Catching Data Entry Errors Syllabus
A check digit is an extra digit added to the end of a number, such as a book's ISBN or a product's barcode. It is calculated from all the other digits.
When the number is typed in or scanned, the computer recalculates the check digit from the other digits. If the result does not match the check digit that was entered, an error has been made and the number is rejected.
Check digits catch common data entry mistakes, including:
- one digit entered incorrectly (e.g. 5 typed instead of 8)
- two neighbouring digits swapped round, called a transposition (e.g. 61 typed as 16) — most of these are caught
- a digit missed out or an extra digit added
A check digit catches most of these mistakes, but not all of them. For example, with the 1-and-3 weighting below, swapping two neighbouring digits that differ by 5 (such as 2 and 7) leaves the check digit unchanged, so the error goes undetected.
Worked example: an ISBN-13 check digit
Modern books have a 13-digit ISBN, and the 13th digit is the check digit. Take the first 12 digits 978-0-306-40615. Multiply them alternately by 1 and 3, then add the results.
| Digit | 9 | 7 | 8 | 0 | 3 | 0 | 6 | 4 | 0 | 6 | 1 | 5 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Weight | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| Product | 9 | 21 | 8 | 0 | 3 | 0 | 6 | 12 | 0 | 18 | 1 | 15 |
93 ÷ 10 = 9 remainder 3
Check digit = 10 − 3 = 7
(If the remainder is 0, the check digit is 0.)
Full ISBN: 978-0-306-40615-7
Worked example: catching a typing error
Someone types the ISBN as 978-0-306-46015-7, swapping the "0" and "6" in the middle.
Entered check digit = 7
9 ≠ 7 → error detected → number rejected
Barcodes on products work in the same way. The common 13-digit retail barcode uses the same 1-and-3 weighting as the ISBN-13 above. When a scanner misreads a barcode, the check digit usually fails and the till asks for it to be scanned again.
Check digits detect data entry errors, such as typing or scanning mistakes. A check digit is also a type of validation check: it shows that the number is valid in form, not that it is the correct number. A different valid number, or an undetected error, can still pass.
Check Your Understanding 5
Explain how a check digit detects that two digits have been swapped when a barcode number is typed in.
Reveal the answer
The computer recalculates the check digit from the digits that were entered. Because each digit is multiplied by a weight that depends on its position, swapping two digits usually changes the total, so the recalculated check digit does not match the one entered, and the error is detected.
All the Methods Compared
| Method | Who checks | What happens on an error | Key limitation |
|---|---|---|---|
| Parity check | Receiver counts the 1s | Data requested again | Misses an even number of flipped bits; cannot locate the error |
| Parity block | Receiver checks rows and columns | A single wrong bit can be located and corrected | Some combinations of several errors still go undetected |
| Checksum | Receiver recalculates and compares | Data requested again | Errors that cancel out can be missed |
| Echo check | Sender compares the returned copy | Data sent again | Doubles transmission; cannot tell which journey the error was on |
| ARQ | Receiver checks; sender waits for an acknowledgement | Negative acknowledgement or timeout → data resent | Resending adds delay |
| Check digit | Computer recalculates the digit on entry | Number rejected; re-enter or rescan | Only checks entered numbers; a few errors can still produce the same check digit |
Worked Scenarios
Scenario A — The silent double error
A system uses even parity on each byte. Two bits in the same byte are flipped by interference, but the receiver accepts the byte.
Reveal the analysis
Flipping two bits keeps the number of 1s even, so the parity check passes even though the data is wrong. A parity block check, or a checksum, would be more likely to catch this.
Scenario B — The lost acknowledgement
A file is sent using ARQ. The data arrives correctly and the receiver sends a positive acknowledgement, but the acknowledgement is lost.
Reveal the analysis
The sender receives nothing before the timeout, so it automatically sends the data again. The receiver now has the data twice and can use numbering to discard the duplicate. The timeout stops the sender waiting forever.
Scenario C — The supermarket till
A barcode is slightly damaged. The scanner reads one digit wrongly, and the till beeps to ask for the item to be scanned again.
Reveal the analysis
The till recalculated the check digit from the digits it read. It did not match the barcode's check digit, so the number was rejected. This is a data entry error caught by a check digit, not a transmission error.
Exam Focus — Describe the Process, Step by Step
These are original FutureLogic practice questions in the Cambridge style. Try each one before revealing the model answer. The marks shown are only a guide: a model answer shows the kind of points examiners look for, but it cannot guarantee marks. Real mark schemes decide, and they accept a range of correct points.
Question 1 (2 marks)
The seven data bits 1011001 are to be sent using even parity, with the parity bit at the left. Write the complete byte, and explain your answer.
Reveal the model answer
Syllabus link: 2.2.2 — parity check (odd and even).
01011001. The data bits contain four 1s, which is already even, so the parity bit is 0.
Why this is a strong answer: it gives the byte and shows the count that justifies the parity bit.
Question 2 (3 marks)
Describe how a checksum is used to detect errors in data after transmission.
Reveal the model answer
Syllabus link: 2.2.2 — checksum.
The sender calculates a checksum from the data using an algorithm and sends it with the data. The receiver recalculates the checksum from the data it receives, using the same algorithm. The two checksums are compared; if they are different, an error has occurred and the data is sent again.
Why this is a strong answer: it covers who calculates, what is sent, the recalculation and the comparison, in order.
Question 3 (4 marks)
Describe how an automatic repeat query (ARQ) is used to make sure data is received without error.
Reveal the model answer
Syllabus link: 2.2.4 — ARQ, including positive and negative acknowledgements and timeout.
The sender transmits the data and starts a timer. The receiver checks the data for errors (for example, using a checksum or parity check). If the data is correct, it sends a positive acknowledgement; if there is an error, it sends a negative acknowledgement and the data is resent. If no acknowledgement is received before the timeout, the sender automatically resends the data.
Why this is a strong answer: it includes both kinds of acknowledgement and the timeout — the three features named in the syllabus.
Question 4 (2 marks)
Calculate the check digit for the ISBN-13 that begins 978-1-86197-271. Use weights of 1 and 3, starting with 1.
Reveal the model answer
Syllabus link: 2.2.3 — check digits, including ISBN.
9 + 21 + 8 + 3 + 8 + 18 + 1 + 27 + 7 + 6 + 7 + 3 = 118. 118 ÷ 10 = 11 remainder 8. Check digit = 10 − 8 = 2.
Why this is a strong answer: it shows the weighted total, the remainder and the final step, so the method is clear even if an arithmetic slip is made.
Common Cambridge Exam Mistakes
A single parity bit only detects an error. Of the methods in this topic, only a parity block can locate (and so correct) a single wrong bit.
If an even number of bits change, the parity stays the same and the error is missed.
The receiver sends the data back. The sender compares.
The timeout is what makes the sender resend when no acknowledgement arrives at all.
Check digits detect errors when data is entered, such as typing or scanning an ISBN or barcode.
Quick Quiz
- What can cause errors during data transmission?
- In even parity, what must be true of every byte?
- Why can a single parity bit miss some errors?
- How does a parity block locate a wrong bit?
- In a checksum, who recalculates the value?
- Give one drawback of an echo check.
- Name the two types of acknowledgement used in ARQ.
- Where are check digits used? Give two examples.
Quick Quiz Answers
Reveal all answers
- Interference, which can cause data loss, data gain or data change.
- The total number of 1s, including the parity bit, is even.
- If an even number of bits are changed, the count of 1s keeps the same parity.
- The failing row and failing column cross at the wrong bit.
- The receiver, using the same algorithm as the sender.
- Either: it doubles the amount of data transmitted; or the sender cannot tell whether the error happened on the way there or back.
- Positive acknowledgement and negative acknowledgement.
- On numbers that are entered or scanned, e.g. ISBNs and barcodes.
Final Summary
Parity Check
Parity bit makes the count of 1s even or odd. Detects an odd number of flipped bits, but cannot locate them.
Parity Block
Row and column checks pinpoint a single wrong bit.
Checksum
Value calculated by sender, recalculated by receiver, compared.
Echo Check
Receiver sends data back; sender compares.
ARQ
Positive and negative acknowledgements, plus a timeout, trigger resends.
Check Digit
Calculated from the other digits; catches data entry errors in ISBNs and barcodes.