Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1Sent: 01000001 | Received: 0100000111 | AThe length is the same and one bit has flipped, so this is data change, not data gain. | |
| 2Sent: HELLO (5 bytes) | Received: HELLOX (6 bytes) | BData gain: extra bits that were never sent have been added, so the data arrives longer | |
| 3Data gain means the message arrives longer than it was sent | CbytesReceived > bytesSent | |
| 4A packet sent with 3 bytes arrives with an extra byte added, giving 4 bytes | Dsent = 3 bytes, received = 4 bytes | |
| 5Sent: 5 bytes | Received: 4 bytes | Error: data gain | EData gain: one extra byte was added to the message | |
| 6Sent: 1011 | Received: 1111 | Error: data gain | FFewer bytes arrived than were sent, so this is data loss, not data gain. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
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.IF receivedLength > sentLength THEN
OUTPUT "Data gain"
ENDIFIF receivedLength > sentLength THEN
OUTPUT "Data gain"
ENDIFextraBytes ← receivedLength - sentLength
OUTPUT extraBytesIF extraBytes > 0 THEN
OUTPUT "Data gain"
ENDIFIF LENGTH(received) > LENGTH(sent) THEN
OUTPUT "Data gain"
ENDIF