Choosing an error detection method for a scenario

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

Choosing an error detection method for a scenario

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A 2 MB file is sent over the internet. Which check suits this scenario best?
A A check digit, because the error happens in transmission
B A checksum calculated on the data and sent with it, because the error happens in transmission
2. A shop scanner reads a bar code and the number is checked on entry. Which method fits?
A A check digit, because the number is read or entered into a system
B A parity bit, because bar codes are sent as bytes
3. A student types the 13 digits of an ISBN into a library system. Which justification is better?
A A check digit can catch a single wrong digit or swapped digits in the typed number
B An echo check is best because it proves the typed number is correct
4. Which answer is a justified choice for a file sent between two computers?
A Use a checksum, because it is the best method
B Use a checksum, because it detects changed data, but it cannot detect every error
5. You want errors in transmission to be detected AND fixed without manual help. Which combination fits?
A An error check with ARQ, so the receiver asks for the data to be sent again
B A check digit alone, because it corrects the data automatically

Match the Pairs

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

Left columnRight column
1Sending a file over a network ACheck digit: ISBN-13 weights 1 and 3, total divisible by 10
2Scanning a bar code at a till BA check digit is for data entry errors, not transmission errors. A parity check, checksum or echo check should be chosen for a file being sent.
3A shop worker types a 13-digit ISBN by hand, so the error is in data entry and a check digit is the right fit. CThe answer gives no justification. It should say what the parity bit can detect, such as a single changed bit, and what it cannot, such as two bits changing.
4Combining a check with ARQ: the receiver checks the data, then sends an acknowledgement or asks for a resend. DParity check fails -> send NAK -> data is sent again
5Answer: Use a check digit to detect interference on a file being sent. EThe error would happen in data entry, so use a check digit, which can spot a misread or mistyped digit, but it cannot prove the number is the right product.
6Answer: Use a parity bit because it is a parity bit. FThe error would happen in transmission, so use a transmission check such as a parity check, checksum or echo check, with ARQ to resend bad data.

Definitions

Choosing a method

Fill in the Blanks

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

1.
IF stage = "transmission" THEN check ← ________ ENDIF
2.
item ← "bar code" IF item = "bar code" ____ check ← checkdigit
3.
entry ← "ISBN typed by hand" IF entry _ "ISBN typed by hand" THEN check ← checkdigit
4.
IF checkok = _____ THEN SEND "NAK" ENDIF
5.
method ← "check digit" reason ← "detects typing errors" OUTPUT method _ " because " + reason

Spot the Error

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

Question 1
A scenario = 'send a file'
B error_type = 'data entry'
C method = 'checksum'
Question 2
A scenario = 'scan a bar code'
B error_type = 'data entry'
C method = 'check digit'
D limit = 'detects every error'
Question 3
A scenario = 'type an ISBN'
B method = 'echo check'
C valid = isbn_ok(code)
Question 4
A got = checksum(packet.data)
B if got != packet.check:
C send('ACK')
D else:
E send('ACK')
Question 5
A method = 'parity bit'
B why = 'corrects bit errors'
C limit = 'misses two bit flips'

Answer Key

Choosing an error detection method for a scenario
Section A: Quick Questions
Q1
B — A checksum calculated on the data and sent with it, because the error happens in transmission
Q2
A — A check digit, because the number is read or entered into a system
Q3
A — A check digit can catch a single wrong digit or swapped digits in the typed number
Q4
B — Use a checksum, because it detects changed data, but it cannot detect every error
Q5
A — An error check with ARQ, so the receiver asks for the data to be sent again
Section B: Match the Pairs
Q1
Sending a file over a network → The error would happen in transmission, so use a transmission check such as a parity check, checksum or echo check, with ARQ to resend bad data.
Q2
Scanning a bar code at a till → The error would happen in data entry, so use a check digit, which can spot a misread or mistyped digit, but it cannot prove the number is the right product.
Q3
A shop worker types a 13-digit ISBN by hand, so the error is in data entry and a check digit is the right fit. → Check digit: ISBN-13 weights 1 and 3, total divisible by 10
Q4
Combining a check with ARQ: the receiver checks the data, then sends an acknowledgement or asks for a resend. → Parity check fails -> send NAK -> data is sent again
Q5
Answer: Use a check digit to detect interference on a file being sent. → A check digit is for data entry errors, not transmission errors. A parity check, checksum or echo check should be chosen for a file being sent.
Q6
Answer: Use a parity bit because it is a parity bit. → The answer gives no justification. It should say what the parity bit can detect, such as a single changed bit, and what it cannot, such as two bits changing.
Section C: Definitions
Q1
Choosing a method — Decide if the error happens in transmission or data entry, pick the check that fits, then justify it by what it can and cannot detect.
Section D: Fill in the Blanks
Q1
IF stage = "transmission" THEN check ← checksum ENDIF
Q2
item ← "bar code" IF item = "bar code" THEN check ← checkdigit
Q3
entry ← "ISBN typed by hand" IF entry = "ISBN typed by hand" THEN check ← checkdigit
Q4
IF checkok = FALSE THEN SEND "NAK" ENDIF
Q5
method ← "check digit" reason ← "detects typing errors" OUTPUT method + " because " + reason
Section E: Spot the Error
Q1
B — Sending a file over a network is a transmission scenario, so errors come from interference in transit. error_type should be 'transmission', not 'data entry'.
Q2
D — A check digit cannot catch every possible error, because some different mistakes give the same check digit. A justified answer must state this limit, so it should be 'misses some errors'.
Q3
B — Typing an ISBN is a data entry situation, so a check digit is the fitting method. An echo check is for data transmission, so method should be 'check digit'.
Q4
C — When the checksum does not match, an error has been detected. The receiver must send a negative acknowledgement, send('NAK'), so ARQ makes the sender resend the packet.
Q5
B — A parity bit only detects that an error has happened. It cannot correct it, so the justification should say it 'detects bit errors'.