What a check digit cannot detect

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

What a check digit cannot detect

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student mistypes an ISBN, but the check digit calculation still gives a valid result. What does this show?
A A number that passes the check must be correct
B A wrong number can still pass the check digit test
2. A student types the ISBN of a different book that is also valid. Will the check digit detect that it is the wrong book?
A No, a valid number for the wrong book passes the check
B Yes, the check digit knows which book was wanted
3. Which statement about a check digit is correct?
A It checks that the number belongs to the right item
B It checks the digits, not what they mean
4. Two mistakes in one number happen to cancel out, so the calculated check digit matches the original. What is the result?
A The error is not detected
B The error is always detected
5. Which job is a check digit designed for?
A Catching typing errors when a number is entered
B Catching interference errors during data transmission

Match the Pairs

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

Left columnRight column
1Digits 1234 changed to 1243, check digit still matches APassing the check does not prove the number is right. A wrong number can still give the same check digit.
2Valid ISBN typed, but it is for a different book BA wrong number that still passes the check, because the error happened to give the same check digit
3A check digit checks the digits only, not what the number means CThe number passes the check but belongs to the wrong item, because a check digit tests digits, not meaning
4A check digit is not designed to find errors during data transmission DParity bit or checksum is used for transmission errors
5Check digit passed, so the number must be correct EA valid number can belong to a different book. The check digit cannot tell if the item is the one intended.
6The check digit is correct, so this is the right book Fcheck_digit_ok = (calculated == last_digit)

Definitions

check digit limitation

Fill in the Blanks

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

1.
total ← 55 valid ← (total ___ 11) = 0
2.
valid ← TRUE IF valid = ____ THEN OUTPUT "Accepted"
3.
checkA ← 7 checkB ← 7 IF checkA _ checkB THEN OUTPUT "Pass"
4.
isbn ← "9780306406157" IF ISBNValid(____) THEN OUTPUT "Digits valid, book unknown"
5.
digitsOK ← TRUE itemOK ← FALSE result ← digitsOK ___ itemOK

Spot the Error

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

Question 1
A INPUT isbn
B ok ← CheckDigitOK(isbn)
C OUTPUT "Right book: ", ok
Question 2
A INPUT code
B valid ← IsRightBook(code)
C IF valid THEN
D OUTPUT "Digits pass"
Question 3
A INPUT typed
B ok ← CheckDigitOK(typed)
C OUTPUT "Transmission OK: ", ok
Question 4
A total ← d1*3 + d2*2 + d3
B rem ← total MOD 11
C rightBook ← (rem = 0)
Question 5
A a ← [4, 5, 1, 2]
B b ← [5, 4, 1, 2]
C s1 ← SUM(a) MOD 11
D s2 ← SUM(b) MOD 10
E OUTPUT s1 = s2

Answer Key

What a check digit cannot detect
Section A: Quick Questions
Q1
B — A wrong number can still pass the check digit test
Q2
A — No, a valid number for the wrong book passes the check
Q3
B — It checks the digits, not what they mean
Q4
A — The error is not detected
Q5
A — Catching typing errors when a number is entered
Section B: Match the Pairs
Q1
Digits 1234 changed to 1243, check digit still matches → A wrong number that still passes the check, because the error happened to give the same check digit
Q2
Valid ISBN typed, but it is for a different book → The number passes the check but belongs to the wrong item, because a check digit tests digits, not meaning
Q3
A check digit checks the digits only, not what the number means → check_digit_ok = (calculated == last_digit)
Q4
A check digit is not designed to find errors during data transmission → Parity bit or checksum is used for transmission errors
Q5
Check digit passed, so the number must be correct → Passing the check does not prove the number is right. A wrong number can still give the same check digit.
Q6
The check digit is correct, so this is the right book → A valid number can belong to a different book. The check digit cannot tell if the item is the one intended.
Section C: Definitions
Q1
check digit limitation — A wrong number can still pass the check digit test, and a valid number may belong to the wrong item. The check digit tests the digits only, not what they mean.
Section D: Fill in the Blanks
Q1
total ← 55 valid ← (total MOD 11) = 0
Q2
valid ← TRUE IF valid = TRUE THEN OUTPUT "Accepted"
Q3
checkA ← 7 checkB ← 7 IF checkA = checkB THEN OUTPUT "Pass"
Q4
isbn ← "9780306406157" IF ISBNValid(isbn) THEN OUTPUT "Digits valid, book unknown"
Q5
digitsOK ← TRUE itemOK ← FALSE result ← digitsOK AND itemOK
Section E: Spot the Error
Q1
C — A check digit only tests the digits. A pass cannot show that the number belongs to the right book. The output should say that the digits pass, for example OUTPUT "Digits pass: ", ok.
Q2
B — A check digit calculation cannot tell whether a number belongs to the right item. It only tests the digits, so line 2 should be valid ← CheckDigitOK(code).
Q3
C — Check digits are designed to catch typing errors on data entry. They are not designed to detect errors made during data transmission. The message should refer to the typing check.
Q4
C — A remainder of 0 only means the digits pass the check. It does not prove the number is for the right book. The variable should be passes ← (rem = 0).
Q5
D — Both numbers must use the same modulus. With MOD 11 for both, the swapped digits give the same check value, so this wrong number would pass. Line 4 should be s2 ← SUM(b) MOD 11.