Echo check

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

Echo check

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. In an echo check, who sends a copy of the data back?
A The sender sends a copy back to the receiver
B The receiver sends a copy back to the sender
2. Who compares the echoed data with the original in an echo check?
A The sender
B The receiver
3. The echoed data matches the original exactly. What does this mean?
A No error was detected
B The data must be sent again
4. The echoed data is different from the original. What happens next?
A The sender sends the data again
B The receiver deletes the original data
5. Which is the correct order for an echo check?
A Compare, send, echo back
B Send, echo back, compare

Match the Pairs

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

Left columnRight column
1echo = receive(data) AIF echo != original THEN resend(data)
2IF echo == original THEN BIn an echo check the sender compares the echo it gets back with the original it sent. The check happens after the receiver sends the copy back, not before sending.
3A mismatch between the echo and the original means the data must be sent again CThe sender compares the echo with what it sent; a match means no error was detected.
4The receiver echoes the data back to the sender after receiving it Dsend(echo, sender)
5The sender checks the data before it is sent, so no echo is needed EResending on a match is wrong. A match means no error was detected, so the data is only sent again when the echo does not match.
6IF echo == original THEN resend(data) FThe receiver takes in the data and keeps a copy to send back to the sender as an echo.

Definitions

echo check

Fill in the Blanks

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

1.
SEND sent TO receiver RECEIVE echo FROM receiver IF echo = sent ____ OUTPUT "OK"
2.
IF echo __ sent THEN SEND sent AGAIN ENDIF
3.
sender: SEND data TO receiver receiver: ____ data BACK TO sender sender: COMPARE reply WITH data
4.
IF echo = sent THEN OUTPUT "No error" ____ SEND sent AGAIN
5.
SEND sent TO receiver RECEIVE ____ FROM receiver COMPARE copy WITH sent

Spot the Error

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

Question 1
A SEND data TO receiver
B RECEIVER SENDS echo TO sender
C COMPARE echo WITH data
D IF echo ≠ data THEN
E OUTPUT no error detected
F ELSE send data again
Question 2
A SENDER sends 01101100
B RECEIVER echoes it back
C RECEIVER compares echo to data
Question 3
A SENDER sends data
B RECEIVER gets data
C RECEIVER sends parity bit back
D SENDER compares echo to data
Question 4
A RECEIVER sends data
B RECEIVER echoes data back
C SENDER compares echo to data
Question 5
A echo ← RECEIVER_ECHO(sent)
B IF echo = echo THEN
C OUTPUT no error detected
D ELSE
E SEND sent again

Answer Key

Echo check
Section A: Quick Questions
Q1
B — The receiver sends a copy back to the sender
Q2
A — The sender
Q3
A — No error was detected
Q4
A — The sender sends the data again
Q5
B — Send, echo back, compare
Section B: Match the Pairs
Q1
echo = receive(data) → The receiver takes in the data and keeps a copy to send back to the sender as an echo.
Q2
IF echo == original THEN → The sender compares the echo with what it sent; a match means no error was detected.
Q3
A mismatch between the echo and the original means the data must be sent again → IF echo != original THEN resend(data)
Q4
The receiver echoes the data back to the sender after receiving it → send(echo, sender)
Q5
The sender checks the data before it is sent, so no echo is needed → In an echo check the sender compares the echo it gets back with the original it sent. The check happens after the receiver sends the copy back, not before sending.
Q6
IF echo == original THEN resend(data) → Resending on a match is wrong. A match means no error was detected, so the data is only sent again when the echo does not match.
Section C: Definitions
Q1
echo check — The receiver sends a copy of the received data back to the sender, who compares it with the original. A match means no error was detected; a mismatch means the data is sent again.
Section D: Fill in the Blanks
Q1
SEND sent TO receiver RECEIVE echo FROM receiver IF echo = sent THEN OUTPUT "OK"
Q2
IF echo <> sent THEN SEND sent AGAIN ENDIF
Q3
sender: SEND data TO receiver receiver: ECHO data BACK TO sender sender: COMPARE reply WITH data
Q4
IF echo = sent THEN OUTPUT "No error" ELSE SEND sent AGAIN
Q5
SEND sent TO receiver RECEIVE copy FROM receiver COMPARE copy WITH sent
Section E: Spot the Error
Q1
D — The condition is reversed. When the echo matches the original data, no error was detected. The line should be IF echo = data THEN, so the 'no error detected' output belongs to a match.
Q2
C — In an echo check the sender does the comparison, because only the sender still has the original data. The line should be SENDER compares echo to data.
Q3
C — An echo check sends back a copy of the received data, not a parity bit. The line should be RECEIVER echoes copy of data so the sender can compare it with the original.
Q4
A — The echo check starts with the sender sending the data. The receiver only echoes it back afterwards. The line should be SENDER sends data.
Q5
B — The echo is being compared with itself, which is always true, so errors would never be found. The echo must be compared with the original data: IF echo = sent THEN.