← IGCSE Computer Science Paper 1

Error detection versus error correction

Checking received data to show that an error has happened. It does not repair the data, so the receiver usually asks for it to be sent again. Some errors can still be missed.

Understanding Error detection versus error correction in IGCSE Computer Science Paper 1

What it does: The check value, such as a checksum, is sent in the packet trailer with the data. The receiver uses it to test whether the data arrived correctly. Two bits changing in one byte keeps the parity the same, so the check passes even though the data is wrong. Error detection only shows that an error has happened. It does not repair the data by itself. The usual approach is detect then resend. The receiver requests the data again, for example using ARQ.

Common mistakes: Error detection only shows that an error has happened. The receiver cannot repair the data, so when the check fails it should request a resend, not accept the data. With even parity the number of 1s should be even. An even count means no error was detected. An odd count would signal an error, so the test should be 'is even'.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 142–154) and word search (Modules 142–164).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A receiver finds that a parity bit does not match the data. What has the parity check done?
Repaired the data so it is correctShown that an error has happened
Matches
parity error found -> the receiver fixes the byte automatically
↓
Detection only shows that an error happened. It does not repair the byte, so the data must be resent.
Applying
Meanings
Term
error detection
Meaning
Checking received data to show that an error has happened. It does not repair the data, so the receiver usually asks for it to be sent again. Some errors can still be missed.
Practice
IF checkSent <> checkWorkedOut THEN
Testing
Gaps
IF checkReceived checkCalculated THEN
Check Answer
Spots
2IF check fails THEN
3 ACCEPT data anyway

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Barreleye Fish' badge — Clear Vision, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A receiver finds that a parity bit does not match the data. What has the parity check done?
A. Repaired the data so it is correct
B. Shown that an error has happened ✓
Error detection only shows that an error has happened. It does not repair the data by itself.
2. After an error is detected in a received packet, what usually happens next?
A. The receiver asks for the data to be sent again ✓
B. The check method fixes the bits automatically
The usual approach is detect then resend. The receiver requests the data again, for example using ARQ.
3. Which statement about error detection is correct?
A. It tells you something went wrong, not what the right data was ✓
B. It always gives back the original correct data
Detection flags a problem. It does not work out or restore the original data by itself.
4. Where does a checksum travel when data is sent?
A. On a separate trip after all the data has been checked
B. With the data, usually in the packet trailer ✓
The error check value is sent along with the data so the receiver can compare it with its own calculation.
5. A packet passes its parity check. Does this prove the data is error free?
A. No, some errors can still be missed ✓
B. Yes, a passed check guarantees no errors
A method can miss some errors. For example, two bits changing in one byte can leave the parity unchanged.

Match the Pairs

parity bit = 1 -> received byte has an odd number of 1s → An error is detected, but the receiver does not know which bit is wrong, so the data is not repaired
IF error found THEN request resend → Detect then resend: the receiver asks the sender to send the data again
The error check travels with the data, so the receiver can compare it with the data that arrived → packet = header + data + trailer(checksum)
A method can miss some errors, so a passed check does not prove the data is perfect → IF parity OK THEN data may still contain errors
parity error found -> the receiver fixes the byte automatically → Detection only shows that an error happened. It does not repair the byte, so the data must be resent.
checksum matches -> the data is 100% error free → A matching checksum does not guarantee there are no errors, because some errors can still be missed.

Key Term

error detection
Checking received data to show that an error has happened. It does not repair the data, so the receiver usually asks for it to be sent again. Some errors can still be missed.

Fill in the Blanks

1. IF checkReceived <> checkCalculated THEN OUTPUT "Error detected" ENDIF
Hint: Type the comparison operator that is true when the two check values are not equal, so the error is flagged
2. IF errorFound = TRUE THEN OUTPUT "Please send again" ENDIF
Hint: Type the Boolean value that tells the receiver an error was found, so it asks for a resend
3. checkValue ← CalculateCheck(data) packet ← data + checkValue SEND packet
Hint: Type the variable holding the error check that travels with the data
4. bitsChanged ← 2 missed ← (bitsChanged MOD 2) = 0 OUTPUT missed
Hint: Type the operator that gives the remainder after division, showing an even number of changed bits can slip past parity
5. REPEAT RECEIVE packet UNTIL errorFound = FALSE
Hint: Type the keyword that ends a REPEAT loop, so the data is resent until no error is detected

Spot the Error

Question 1
A RECEIVE data, check
B IF check fails THEN
C ACCEPT data anyway
D ELSE
E ACCEPT data
Line C — Error detection only shows that an error has happened. The receiver cannot repair the data, so when the check fails it should request a resend, not accept the data.
Question 2
A ones ← COUNT(1s), even parity
B IF ones is odd THEN
C PRINT 'No error detected'
Line B — With even parity the number of 1s should be even. An even count means no error was detected. An odd count would signal an error, so the test should be 'is even'.
Question 3
A sent ← [3, 5], checksum ← 8
B got ← [5, 3], sum ← 8
C PRINT 'Error detected'
Line C — Swapping the two values still gives a sum of 8, so the checksum matches and this error is missed. The program should print that the checksum matches. A method can miss some errors.
Question 4
A REPEAT
B SEND packet, check
C RECEIVER repairs the data
D RECEIVER sends ACK or NAK
E UNTIL reply = ACK
Line C — The receiver only checks the data to detect errors. It does not repair it. A NAK makes the sender resend the packet, and the loop repeats until an ACK arrives.
Question 5
A RECEIVE packet
B SPLIT into data, trailer
C calc ← CHECKSUM(data)
D IF calc = trailer THEN NAK
E ELSE ACK
Line D — A NAK should be sent when the calculated checksum is different from the trailer value (<>), because that shows an error was detected. A match means ACK.

Student with a class code? Join your class →