FutureLogic Blog → Data Transmission → IGCSE Computer Science

Error Detection Explained

Data can be damaged on its journey or mistyped when it is entered. Learn how parity checks, checksums, echo checks, check digits and ARQ catch the errors — with every worked example shown step by step.

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.

Data bits: 1001101 → four 1s

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.

Received: 01001111 → five 1s → odd
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.
Sent: 01001101 (four 1s, even)
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 01010110
Byte 2 00110011
Byte 3 11110000
Byte 4 00001111
Parity byte 10011010

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.
One parity bit says "something is wrong". If a single bit is wrong, a parity block can point to exactly where.

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.

Data sent (denary): 150, 200, 75, 30
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.

Exam Tip: You will not be asked to remember a particular checksum algorithm. You need the process: calculated by the sender, sent with the data, recalculated by the receiver, compared.

Echo Check — Sending the Data Back Syllabus

An echo check works like repeating a phone number back to the person who told you it.

  1. The sender transmits the data.
  2. The receiver sends a copy of the data it received back to the sender.
  3. The sender compares the returned copy with the original.
  4. If they match, the data is assumed to have arrived correctly. If not, an error has occurred and the data is sent again.
Sender ── data ──▶ Receiver
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.

✗ Common Mistake: "In an echo check, the receiver checks the data."
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).
Data sent + timer started
↓
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.

Extension: If only the acknowledgement was lost, the receiver ends up with two copies of the same data. Numbering the data — just like the packet numbers in Part 1 — lets the receiver spot and discard the duplicate.

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.

TRANSMISSION ERRORS → DATA ENTRY ERRORS

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 978030 640615
Weight 131313 131313
Product 9218030 612018115
Total = 9 + 21 + 8 + 0 + 3 + 0 + 6 + 12 + 0 + 18 + 1 + 15 = 93
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.

Recalculated total = 81 → remainder 1 → check digit 9
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.

Extension: Older 10-digit ISBNs used a different method, called modulo 11, where the check digit can be the letter X (meaning 10). The principle is identical: the final character is calculated from the others.
✗ Common Mistake: using a check digit to detect transmission errors.
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

✗ Saying a parity check corrects errors.
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.
✗ Saying parity detects every error.
If an even number of bits change, the parity stays the same and the error is missed.
✗ Saying the receiver compares the data in an echo check.
The receiver sends the data back. The sender compares.
✗ Leaving out the timeout in an ARQ answer.
The timeout is what makes the sender resend when no acknowledgement arrives at all.
✗ Linking check digits to transmission.
Check digits detect errors when data is entered, such as typing or scanning an ISBN or barcode.

Quick Quiz

  1. What can cause errors during data transmission?
  2. In even parity, what must be true of every byte?
  3. Why can a single parity bit miss some errors?
  4. How does a parity block locate a wrong bit?
  5. In a checksum, who recalculates the value?
  6. Give one drawback of an echo check.
  7. Name the two types of acknowledgement used in ARQ.
  8. Where are check digits used? Give two examples.

Quick Quiz Answers

Reveal all answers
  1. Interference, which can cause data loss, data gain or data change.
  2. The total number of 1s, including the parity bit, is even.
  3. If an even number of bits are changed, the count of 1s keeps the same parity.
  4. The failing row and failing column cross at the wrong bit.
  5. The receiver, using the same algorithm as the sender.
  6. Either: it doubles the amount of data transmitted; or the sender cannot tell whether the error happened on the way there or back.
  7. Positive acknowledgement and negative acknowledgement.
  8. 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.

Detect the error. Then get the data again.
Data Transmission Mini-Series · Part 3 of 3

You have completed the Data Transmission mini-series.

Packets, transmission methods and error detection — all three connected. Practise with the interactive trainer, or revisit Part 1 to test yourself on packet switching.