← IGCSE Computer Science Paper 1

Packet trailer

The last part of a packet. It marks where the packet ends and can hold error checking information, so the receiving device can check the data arrived correctly.

Understanding Packet trailer in IGCSE Computer Science Paper 1

What it does: The order of a packet is header, then payload, then trailer, so the trailer is always at the end. The receiver works out its own check value from the payload and compares it with the one in the trailer. If they differ, the data was damaged. The receiving device uses the error checking information to check the packet's data arrived without errors.

Common mistakes: The trailer is the last part of a packet. The payload is the data in the middle, so line 1 should be last_part ← trailer. The trailer is the third and final part of the packet, so the last part is order[3]. order[1] would give the header.

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 110–120) and word search (Modules 86–120).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which part of a packet comes last?
The trailerThe header
Matches
packet = trailer + payload + header
↓
The trailer is placed at the start of the packet. It should be the last part, after the payload, so the packet is header + payload + trailer.
Applying
Meanings
Term
packet trailer
Meaning
The last part of a packet. It marks where the packet ends and can hold error checking information, so the receiving device can check the data arrived correctly.
Practice
HEADER: destination, origin, number
Testing
Gaps
packet = [header, payload, ]
Check Answer
Spots
1last_part ← payload
2trailer.marks ← end_of_packet

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

The 'Giraffe' badge — High Perspective, 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. Which part of a packet comes last?
A. The trailer ✓
B. The header
A packet has three parts in order: header, payload, then the trailer at the end.
2. What does the packet trailer do?
A. Stores the destination address
B. Marks the end of the packet ✓
The trailer is the end of packet marker. The destination address is stored in the header.
3. True or false: a packet trailer can hold error checking information.
A. False
B. True ✓
The trailer can hold error checking information, which the receiving device uses to check the data.
4. Which item belongs in the packet trailer?
A. An end of packet marker ✓
B. The packet number
The packet number is stored in the header. The trailer holds the end marker and can hold error checking information.
5. Which shows the packet parts in the correct order?
A. Header, payload, trailer ✓
B. Header, trailer, payload
The trailer is always the last part of the packet, after the payload.

Match the Pairs

packet trailer → The last part of a packet, which marks where the packet ends
trailer: end_marker, check_value → A trailer holding an end of packet marker and error checking information
The trailer is the last part of a packet, after the header and the payload → packet = header + payload + trailer
The trailer can hold error checking information that the receiver compares with the data it received → if check_value(payload) != trailer.check: resend()
packet = trailer + payload + header → The trailer is placed at the start of the packet. It should be the last part, after the payload, so the packet is header + payload + trailer.
trailer = destination address, packet number → The destination address and packet number belong in the header, not the trailer. The trailer holds the end marker and error checking information.

Key Term

packet trailer
The last part of a packet. It marks where the packet ends and can hold error checking information, so the receiving device can check the data arrived correctly.

Fill in the Blanks

1. packet = [header, payload, trailer]
Hint: Type the name of the packet part that comes last.
2. endPart = packet.trailer
Hint: Type the name of the packet part that marks where the packet ends.
3. IF packet.trailer = "END" THEN OUTPUT "Packet has ended" ENDIF
Hint: Type the packet part that holds the end of packet marker.
4. trailer = [endMarker, errorCheck]
Hint: Type the field name for the error checking information the trailer can hold.
5. IF trailer.errorCheck = "OK" THEN OUTPUT "Data arrived correctly" ENDIF
Hint: Type the packet part that holds the error checking information.

Spot the Error

Question 1
A last_part ← payload
B trailer.marks ← end_of_packet
C OUTPUT last_part
Line A — The trailer is the last part of a packet. The payload is the data in the middle, so line 1 should be last_part ← trailer.
Question 2
A order ← [head, data, trailer]
B last ← order[1]
C OUTPUT last
Line B — The trailer is the third and final part of the packet, so the last part is order[3]. order[1] would give the header.
Question 3
A READ trailer
B IF trailer found THEN
C end_reached ← FALSE
Line C — Once the trailer is found, the end of the packet has been reached, so end_reached should be set to TRUE.
Question 4
A READ part
B IF part = payload THEN
C OUTPUT "End of packet"
D ENDIF
Line B — The trailer marks the end of the packet, not the payload. The test should be IF part = trailer THEN.
Question 5
A trailer ← check_value
B received ← calc(payload)
C IF received ≠ trailer THEN
D OUTPUT "Data OK"
Line C — The data is only OK if the check value calculated on arrival matches the one in the trailer. The test should use = not ≠.

Student with a class code? Join your class →