Positive acknowledgement

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

Positive acknowledgement

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does a positive acknowledgement tell the sender?
A The data arrived with an error and must be resent
B The data arrived without error
2. Who sends a positive acknowledgement?
A The receiver
B The sender
3. How is a positive acknowledgement often written?
A NAK
B ACK
4. When is a positive acknowledgement sent?
A Only after the error check passes
B Before the error check is done
5. The receiver gets a packet and its checksum matches. What should it send back?
A A positive acknowledgement (ACK)
B A negative acknowledgement

Match the Pairs

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

Left columnRight column
1ACK AAn ACK means the data arrived without error, so the sender should send the next data. Resending the same data is what happens after an error, not after an ACK.
2receiver sends ACK to sender BIF ACK received THEN send next packet
3A positive acknowledgement is sent only after the error check passes CThe receiver tells the sender that the data passed the error check and the sender can send the next data
4When the sender receives an ACK, it can send the next data DAn ACK must only be sent after the error check passes. Sending it before the check means the receiver cannot know the data arrived without error.
5Receiver sends ACK before checking the data for errors EIF errorCheck = PASS THEN SEND ACK
6Sender gets ACK so it sends the same data again FShort for positive acknowledgement: a message from the receiver telling the sender the data arrived without error

Definitions

positive acknowledgement

Fill in the Blanks

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

1.
IF errorCheck = PASS THEN SEND ___ ENDIF
2.
IF errorCheck = PASS ____ SEND ACK ENDIF
3.
RECEIVE reply IF reply _ ACK THEN SEND nextData
4.
RECEIVE reply IF reply = ACK THEN ____ nextData
5.
IF errorFound = _____ THEN SEND ACK ENDIF

Spot the Error

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

Question 1
A RECEIVE packet
B CHECK packet for ACK
C IF no error THEN
D SEND ACK to sender
E ENDIF
Question 2
A SEND packet 1
B WAIT for reply
C IF reply = NAK THEN
D SEND packet 2
E ENDIF
Question 3
A RECEIVE packet
B CHECK parity of packet
C IF parity is wrong THEN
D SEND ACK
Question 4
A RECEIVE byte
B CHECK parity bit
C IF parity is correct THEN
D SEND NAK to sender
E ENDIF
Question 5
A RECEIVE packet 3
B IF check fails THEN
C SEND ACK for packet 3
D ENDIF

Answer Key

Positive acknowledgement
Section A: Quick Questions
Q1
B — The data arrived without error
Q2
A — The receiver
Q3
B — ACK
Q4
A — Only after the error check passes
Q5
A — A positive acknowledgement (ACK)
Section B: Match the Pairs
Q1
ACK → Short for positive acknowledgement: a message from the receiver telling the sender the data arrived without error
Q2
receiver sends ACK to sender → The receiver tells the sender that the data passed the error check and the sender can send the next data
Q3
A positive acknowledgement is sent only after the error check passes → IF errorCheck = PASS THEN SEND ACK
Q4
When the sender receives an ACK, it can send the next data → IF ACK received THEN send next packet
Q5
Receiver sends ACK before checking the data for errors → An ACK must only be sent after the error check passes. Sending it before the check means the receiver cannot know the data arrived without error.
Q6
Sender gets ACK so it sends the same data again → An ACK means the data arrived without error, so the sender should send the next data. Resending the same data is what happens after an error, not after an ACK.
Section C: Definitions
Q1
positive acknowledgement — A message sent by the receiver to tell the sender that data arrived without error. Often written ACK. It is sent only after the error check passes, so the sender can send the next data.
Section D: Fill in the Blanks
Q1
IF errorCheck = PASS THEN SEND ACK ENDIF
Q2
IF errorCheck = PASS THEN SEND ACK ENDIF
Q3
RECEIVE reply IF reply = ACK THEN SEND nextData
Q4
RECEIVE reply IF reply = ACK THEN SEND nextData
Q5
IF errorFound = FALSE THEN SEND ACK ENDIF
Section E: Spot the Error
Q1
B — The receiver checks the packet for errors, not for an ACK. The ACK is what the receiver sends after the check passes. It should be CHECK packet for errors.
Q2
C — The sender may send the next packet only when a positive acknowledgement (ACK) arrives. A NAK means an error was found. It should be IF reply = ACK THEN.
Q3
C — An ACK is sent only when the error check passes. The condition must test that the parity is correct, not wrong.
Q4
D — When the check passes, the receiver sends a positive acknowledgement (ACK). NAK is the negative acknowledgement used when an error is found. It should be SEND ACK to sender.
Q5
B — The ACK means the data arrived without error, so it is sent only when the check passes. It should be IF check passes THEN.