← IGCSE Computer Science Paper 1

Data loss

When some bits or bytes that were sent never arrive, so the message that is received is shorter than the one that was sent.

Understanding Data loss in IGCSE Computer Science Paper 1

What it does: Fewer bytes arrived than were sent, so 2 bytes were lost. This is the typical sign of data loss.

Common mistakes: Data loss means the received message is shorter than the one sent. The test should be LEN(got) < LEN(sent), not >. The number of bytes lost is the bytes sent minus the bytes received. The subtraction is the wrong way round and gives -1 instead of 1.

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 device sends 8 bytes of data but the receiver only gets 7 bytes. Which type of error is this?
Data lossData gain
Matches
Sent: HELLO | Received: HELLOO (data loss)
↓
The received message is longer, not shorter. An extra character means data gain, not data loss.
Applying
Meanings
Term
data loss
Meaning
When some bits or bytes that were sent never arrive, so the message that is received is shorter than the one that was sent.
Practice
sent ← "HELLO"
Testing
Gaps
OUTPUT (sent) - LENGTH(received)
Check Answer
Spots
2got <- "HELO"
3IF LEN(got) > LEN(sent) THEN

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

The 'Zebra' badge — Pattern Matcher, 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 device sends 8 bytes of data but the receiver only gets 7 bytes. Which type of error is this?
A. Data loss ✓
B. Data gain
Data loss is when some of the bytes that were sent never arrive, so the message received is shorter than the one sent.
2. Which statement describes data loss?
A. Some bits or bytes that were sent never arrive ✓
B. Extra bits or bytes arrive that were never sent
Data loss means something is missing at the receiver. Extra bytes arriving is data gain.
3. The message HELLO is sent. The receiver gets HELO. What has happened?
A. A byte was gained, so the message is longer
B. A byte was lost, so the message is shorter ✓
HELLO has 5 characters and HELO has 4. One byte is missing, so this is data loss.
4. After a message is received, how can you spot data loss by comparing it with the message that was sent?
A. The received message is longer
B. The received message is shorter ✓
With data loss the message that arrives is shorter than the one that was sent.
5. A packet is sent as 10 bytes. Which received size would show data loss?
A. 9 bytes ✓
B. 11 bytes
9 bytes is fewer than the 10 that were sent, so a byte is missing. 11 bytes would be data gain.

Match the Pairs

Sent: 01001000 01101001 | Received: 01001000 → Data loss: the second byte never arrived, so the message is shorter than the one sent
Sent: CAT | Received: CT → Data loss: one character (byte) went missing in transmission
Data loss means the received message is shorter than the sent message → sent = 5 bytes, received = 3 bytes
Data loss happens when a byte that was sent never arrives → Sent: 11110000 10101010 00001111 | Received: 11110000 00001111
Sent: HELLO | Received: HELLOO (data loss) → The received message is longer, not shorter. An extra character means data gain, not data loss.
Sent: 8 bytes | Received: 8 bytes, but two bytes arrived missing, so data loss → If all 8 bytes arrived, nothing is missing. Data loss needs the received message to be shorter than the sent one.

Key Term

data loss
When some bits or bytes that were sent never arrive, so the message that is received is shorter than the one that was sent.

Fill in the Blanks

1. sent ← "HELLO" received ← "HELO" OUTPUT LENGTH(sent) - LENGTH(received)
Hint: Type the function that counts how many characters are in a string.
2. sentCount ← 5 receivedCount ← 4 lostBytes ← sentCount - receivedCount
Hint: Type the operator that works out how many bytes are missing.
3. IF LENGTH(received) < LENGTH(sent) THEN OUTPUT "Data loss" ENDIF
Hint: Type the comparison operator that shows the received message is shorter than the sent one.
4. IF lostBytes > 0 THEN OUTPUT "Byte missing" ENDIF
Hint: Type the keyword that comes after the condition in an IF statement.
5. sent ← "A1B2C3" received ← "A1B2C" lostBytes ← LENGTH(sent) - LENGTH(received)
Hint: Type the variable that holds the message that arrived.

Spot the Error

Question 1
A sent <- "HELLO"
B got <- "HELO"
C IF LEN(got) > LEN(sent) THEN
D OUTPUT "Data loss"
E ENDIF
Line C — Data loss means the received message is shorter than the one sent. The test should be LEN(got) < LEN(sent), not >.
Question 2
A bytesSent <- 5
B bytesGot <- 4
C lost <- bytesGot - bytesSent
D OUTPUT lost
Line C — The number of bytes lost is the bytes sent minus the bytes received. The subtraction is the wrong way round and gives -1 instead of 1.
Question 3
A sent <- "DOG"
B got <- "DOGS"
C OUTPUT LEN(sent) - LEN(got)
Line B — In data loss the received message is shorter than the sent one, so got should be "DO" (the G never arrived). "DOGS" is longer, which would be data gain.
Question 4
A sent <- MESSAGE
B got <- "MESAGE"
C shortBy <- LEN(sent) - LEN(got)
D OUTPUT shortBy
Line A — The text that was sent is a string, so it must be written in quotes: sent <- "MESSAGE". Without quotes MESSAGE looks like a variable.
Question 5
A sent <- "HELLO"
B got <- "HLLO"
C lost <- LEN(sent) - LEN(got)
D IF lost < 0 THEN
E OUTPUT "Data loss"
F ENDIF
Line D — A positive value in lost means bytes went missing, so data loss is detected when lost > 0. Checking for < 0 would only be true if the message grew.

Student with a class code? Join your class →