← IGCSE Computer Science Paper 1

Data gain

Data gain is when extra bits or bytes that were not sent are added to the data, so the message arrives longer than it was sent. It is a type of transmission error.

Understanding Data gain in IGCSE Computer Science Paper 1

What it does: If more bytes arrive than were sent, extra data has been added, which is data gain. Data gain, along with data loss and data change, is a type of transmission error that can be caused by interference.

Common mistakes: Data gain means the message arrives longer than it was sent, so extra must be greater than 0. A negative value would mean data loss. It should be IF extra > 0 THEN. If the two byte counts are equal, the message is the same length and nothing has been gained. Data gain is when more bytes arrive than were sent, so the test should use >.

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 student sends the 4-byte message 01001000 01101001 00100001 00101110, but 5 bytes arrive. Which transmission error is this?
Data gainData loss
Matches
Sent: 5 bytes | Received: 4 bytes | Error: data gain
↓
Fewer bytes arrived than were sent, so this is data loss, not data gain.
Applying
Meanings
Term
data gain
Meaning
Data gain is when extra bits or bytes that were not sent are added to the data, so the message arrives longer than it was sent. It is a type of transmission error.
Practice
sent ← "HELLO"
Testing
Gaps
IF receivedLength sentLength THEN
Check Answer
Spots
3extra ← received - sent
4IF extra < 0 THEN

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

The 'Coelacanth' badge — Living Fossil, 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 student sends the 4-byte message 01001000 01101001 00100001 00101110, but 5 bytes arrive. Which transmission error is this?
A. Data gain ✓
B. Data loss
Data gain happens when extra bytes that were not sent are added, so the message arrives longer than it was sent.
2. Which statement correctly describes data gain?
A. Extra bits or bytes that were not sent are added to the data ✓
B. Some bits or bytes of the data go missing on the way
Gain means extra data is added. Missing data is data loss.
3. A file is sent as 1000 bytes. The receiver counts 1003 bytes. What has happened?
A. Data change: 3 bytes were altered
B. Data gain: 3 extra bytes were added ✓
The message arrived longer than it was sent, so extra bytes were added. In data change the length stays the same but some bits are different.
4. Sent: 10110010 01100001. Received: 10110010 01100001 11111111. Which is true?
A. An extra byte has been added, so this is data gain ✓
B. A byte has been lost, so this is data loss
The extra byte 11111111 was never sent, so the data has gained a byte.
5. How can you spot data gain by comparing the sent and received messages?
A. The received message is shorter than the sent message
B. The received message is longer than the sent message ✓
A longer received message means extra data was added. A shorter one points to data loss.

Match the Pairs

Sent: 01000001 | Received: 0100000111 → Data gain: extra bits that were never sent have been added, so the data arrives longer
Sent: HELLO (5 bytes) | Received: HELLOX (6 bytes) → Data gain: one extra byte was added to the message
Data gain means the message arrives longer than it was sent → bytesReceived > bytesSent
A packet sent with 3 bytes arrives with an extra byte added, giving 4 bytes → sent = 3 bytes, received = 4 bytes
Sent: 5 bytes | Received: 4 bytes | Error: data gain → Fewer bytes arrived than were sent, so this is data loss, not data gain.
Sent: 1011 | Received: 1111 | Error: data gain → The length is the same and one bit has flipped, so this is data change, not data gain.

Key Term

data gain
Data gain is when extra bits or bytes that were not sent are added to the data, so the message arrives longer than it was sent. It is a type of transmission error.

Fill in the Blanks

1. IF receivedLength > sentLength THEN OUTPUT "Data gain" ENDIF
Hint: Type the comparison operator that checks whether the received message is longer than the sent one.
2. IF receivedLength > sentLength THEN OUTPUT "Data gain" ENDIF
Hint: Type the pseudocode keyword that displays a message to the user.
3. extraBytes ← receivedLength - sentLength OUTPUT extraBytes
Hint: Type the arithmetic operator that works out how many extra bytes arrived by finding the difference in length.
4. IF extraBytes > 0 THEN OUTPUT "Data gain" ENDIF
Hint: Type the pseudocode keyword that closes an IF block.
5. IF LENGTH(received) > LENGTH(sent) THEN OUTPUT "Data gain" ENDIF
Hint: Type the pseudocode function name that returns how long a message is.

Spot the Error

Question 1
A sent ← 5
B received ← 6
C extra ← received - sent
D IF extra < 0 THEN
E OUTPUT "Data gain"
F ENDIF
Line D — Data gain means the message arrives longer than it was sent, so extra must be greater than 0. A negative value would mean data loss. It should be IF extra > 0 THEN.
Question 2
A sentBytes ← 4
B receivedBytes ← 5
C IF receivedBytes = sentBytes THEN
D OUTPUT "Data gain"
E ENDIF
Line C — If the two byte counts are equal, the message is the same length and nothing has been gained. Data gain is when more bytes arrive than were sent, so the test should use >.
Question 3
A sent ← "01000001
B received ← "010000011"
C gain ← LENGTH(received) - LENGTH(sent)
D OUTPUT gain
Line A — The string is missing its closing quote. It should be sent ← "01000001", the 8 bits that were sent. The received string has 9 bits, so one extra bit has been gained.
Question 4
A PROCEDURE CheckGain(s, r)
B IF LENGTH(r) > LENGTH(s) THEN
C RETURN TRUE
D ENDIF
E ENDFUNCTION
Line A — The block ends with ENDFUNCTION and uses RETURN, so it must start with FUNCTION, not PROCEDURE. It should be FUNCTION CheckGain(s, r).
Question 5
A sLen ← 2
B rLen ← 3
C extra ← sLen - rLen
D OUTPUT extra, " extra bytes"
Line C — The number of extra bytes is the received length minus the sent length. Subtracting the other way round gives -1. It should be extra ← rLen - sLen.

Student with a class code? Join your class →