Why data is checked after transmission

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Why data is checked after transmission

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Why does a receiver need to check data after it has been transmitted?
A The data may have been damaged on its way from the sender
B The data always arrives exactly as it was sent
2. Which statement about the receiver is true?
A It cannot see the original data, so it needs a method to check what arrived
B It can look at the original data and compare it with the received copy
3. A student opens a file they downloaded and it is full of strange symbols. What is the most likely cause?
A The file was made smaller by the sender on purpose
B The data was corrupted during transmission
4. What is the purpose of error detection?
A To stop interference from ever happening
B To find out whether the received data has been damaged
5. What is the first step to fixing a transmission error?
A Detecting that an error has happened
B Ignoring the data and using it anyway

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1error detection AData can be damaged by interference in transit, so arriving does not mean it is correct. It must be checked.
2corrupted file BThe receiver cannot see the original data, so it cannot compare directly. It must use an error detection check instead.
3The receiver cannot see the original data, so it needs a check to tell whether the data was damaged Cif error: request_resend()
4Detecting an error is the first step to fixing it, so a failed check leads to a request to send again DA file whose data was changed or damaged in transit, so it no longer matches what was sent
5Data arrives, so it must be correct. No check needed. EChecking received data to find out whether it was damaged on its way from the sender
6The receiver compares the data with the sender's original copy. Fif check_failed: error found

Definitions

error detection

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF checkReceived __ checkSent THEN
2.
______ "Error detected"
3.
_______ message FROM sender errorFound ← FALSE
4.
IF checkReceived <> checkSent THEN errorFound ← ____ ENDIF
5.
__ errorFound THEN OUTPUT "Resend"

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A OUTPUT 'Waiting for data'
B RECEIVE msg FROM receiver
C error ← CHECK(msg)
Question 2
A error_found ← CHECK(msg)
B IF error_found = FALSE THEN
C OUTPUT 'Data damaged'
D ENDIF
Question 3
A error ← CHECK(original)
B IF error = TRUE THEN
C OUTPUT 'Ask for resend'
D ENDIF
Question 4
A SEND file TO sender
B damaged ← CHECK(file)
C IF damaged = TRUE THEN
D OUTPUT 'Send it again'
E ENDIF
Question 5
A RECEIVE msg FROM sender
B error ← CHECK(msg)
C IF error = TRUE
D OUTPUT 'Damaged: resend'
E ENDIF

Answer Key

Why data is checked after transmission
Section A: Quick Questions
Q1
A — The data may have been damaged on its way from the sender
Q2
A — It cannot see the original data, so it needs a method to check what arrived
Q3
B — The data was corrupted during transmission
Q4
B — To find out whether the received data has been damaged
Q5
A — Detecting that an error has happened
Section B: Match the Pairs
Q1
error detection → Checking received data to find out whether it was damaged on its way from the sender
Q2
corrupted file → A file whose data was changed or damaged in transit, so it no longer matches what was sent
Q3
The receiver cannot see the original data, so it needs a check to tell whether the data was damaged → if check_failed: error found
Q4
Detecting an error is the first step to fixing it, so a failed check leads to a request to send again → if error: request_resend()
Q5
Data arrives, so it must be correct. No check needed. → Data can be damaged by interference in transit, so arriving does not mean it is correct. It must be checked.
Q6
The receiver compares the data with the sender's original copy. → The receiver cannot see the original data, so it cannot compare directly. It must use an error detection check instead.
Section C: Definitions
Q1
error detection — Checking received data, because it can be damaged in transit and the receiver cannot see the original. Spotting the error is the first step to fixing it.
Section D: Fill in the Blanks
Q1
IF checkReceived <> checkSent THEN
Q2
OUTPUT "Error detected"
Q3
RECEIVE message FROM sender errorFound ← FALSE
Q4
IF checkReceived <> checkSent THEN errorFound ← TRUE ENDIF
Q5
IF errorFound THEN OUTPUT "Resend"
Section E: Spot the Error
Q1
B — The receiver gets data from the sender, not from itself. Line 2 should be RECEIVE msg FROM sender so the arrived data can then be checked.
Q2
B — The damaged message should only be shown when an error WAS found. The condition must be error_found = TRUE, otherwise good data is reported as damaged.
Q3
A — The receiver cannot see the original data, only what arrived. The check must use the received data, so line 1 should be error ← CHECK(received).
Q4
A — The receiver must first receive the file before it can check it for damage. Line 1 should be RECEIVE file FROM sender, not SEND.
Q5
C — The IF statement is missing THEN. Line 3 should be IF error = TRUE THEN so the code runs when an error is detected.