Check Digit ISBN
Check Digit ISBN
Check Digit
Q. What is check digit?
A. A check digit is a form of redundancy check used for error detection on identification
numbers, such as bank account numbers, credit cards, driver’s licenses, VIN numbers, zip
codes, ISBN numbers, bar codes/ Universal Product Codes (UPC) etc. Usually, the last digit
(right most digit) in such an identification number is the check digit which is calculated using
a particular formula. For example, if 036000241457 is the UPC of a product then the last digit
7 is the check digit.
Page 1 of 5
⇒ 𝑥 + 60 ≡ −53 + 60 (𝑚𝑜𝑑 10); [𝑠𝑖𝑛𝑐𝑒 60 ≡ 60 (𝑚𝑜𝑑 10)]
⇒ 𝑥 ≡ 7 (𝑚𝑜𝑑 10); [𝑠𝑖𝑛𝑐𝑒 60 ≡ 0 (𝑚𝑜𝑑 10)]
Hence the check digit is 7 as stated before and the complete UPC is 036000241457.
Q. Suppose that we receive two bit strings 1101111 and 11001000, where the last bit in each
sting is a parity check bit. Verify whether these strings are correct or not.
A. For the first sting, note that 1 + 1 + 0 + 1 + 1 + 1 + 1 = 6 ≡ 0 (mod 2), so that either this
string is what was transmitted or it contains an even number of errors. For the second string,
note that 1 + 1 + 0 + 0 + 1 + 0 + 0 + 0 = 3 ≡ 1 (mod 2), so that the received string was not the
actual string that was sent; there is surely at least one error or an odd number of errors in this
string.
PRACTICE: From the book of Rosen: Read article 5.5 (Page 209) and practice example 5.13
(page 210), Exercise 5.5 (page 212) – Problem no. 2, 3, 5, 6, 7, 8.
ISBN
Q. What is ISBN?
A. The International Standard Book Number (ISBN) is a numeric commercial book identifier
which is intended to be unique. Publishers purchase ISBNs from an affiliate of the International
ISBN Agency. When a book is published, it is assigned an ISBN. From 1970 until 2007, this
number consisted of a 10-digit number, but it now consists of a 13-digit number. For example,
the ISBN of the book UMAP Modules is 0-912843-07-1, but the ISBN of Dan Brown’s The
lost Symbol is 978-0-385-50422-5.
Page 2 of 5
identifying numbers that COMAP has assigned to the book; and the final digit, 1, is called the
check digit of the ISBN.
Note that in (*), we used modulo 11 which implies that the value of the check digit 𝑥10 can not
only be any of the single digits from 0 to 9 but also it can be 10 [since when you divide a
number by 11, the remainder can be any number from 0 to 10]. Thus 0 ≤ 𝑥10 ≤ 10. But as
only one character is assigned for the check digit, we write 𝑥10 as a capital X when the value
of 𝑥10 is 10.
Note also that, you can compute the check digit 𝑥10 by another formula reversing the weights
of the digits in (*), that is,
1𝑥1 + 2𝑥2 + 3𝑥3 + 4𝑥4 + 5𝑥5 + 6𝑥6 + 7𝑥7 + 8𝑥8 + 9𝑥9 + 10𝑥10 ≡ 0 (𝑚𝑜𝑑 11)
10
For a 13-digit ISBN: If 𝑥13 denotes the check digit if an ISBN 𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 𝑥6 𝑥7 𝑥8 𝑥9 𝑥10 𝑥11 𝑥12
then we must have
𝑥1 + 𝑥3 + 𝑥5 + 𝑥7 + 𝑥9 + 𝑥11 + 𝑥13 + 3(𝑥2 + 𝑥4 + 𝑥6 + 𝑥8 + 𝑥10 + 𝑥12 ) ≡ 0 (𝑚𝑜𝑑 10)
13 13
Note that in (***), we used modulo 10 which implies that the value of the check digit 𝑥13 can
only be any one of the single digit from 0 to 9.
Q. Check whether the check digit of the ISBN 91-825-6407-8 is correct or not. Transpose the
3rd and 4th digits (from left) of this ISBN and determine whether the check digit of the new
ISBN (i.e. 91-285-6407) remains the same as before.
Page 3 of 5
A. Try yourself. (Solution: Yes, correct. Check digit of the new ISBN is 3 which is not same
as before)
Note: You can try finding the check digit of any new ISBN formed by transposing any two
adjacent digits of the original ISBN. The check digits will always be different.
Q. Prove that both the formulae (*) and (**) produce the same check digit for a particular ISBN.
A. Hints: 10 ≡ −1 (𝑚𝑜𝑑 11), 9 ≡ −2 (𝑚𝑜𝑑 11), 8 ≡ −3 (𝑚𝑜𝑑 11) 𝑎𝑛𝑑 𝑠𝑜 𝑜𝑛.
PROOF: If 𝑎1 𝑎2 … … 𝑎9 are the first 9 digits of an ISBN, then the check digit 𝑎10 can be
determined by the formula ∑10 𝑖=1 𝑖 𝑎𝑖 ≡ 0 (𝑚𝑜𝑑 11) or equivalently 𝑎10 ≡
9
∑𝑖=1 𝑖 𝑎𝑖 (𝑚𝑜𝑑 11).
We begin with part (a). Suppose that for some j satisfying 1 ≤ 𝑗 ≤ 9, we change 𝑎𝑗 to 𝑏, where
0 ≤ 𝑎𝑗 , 𝑏 ≤ 9 𝑎𝑛𝑑 𝑎𝑗 ≠ 𝑏. For the check digit to remain unchanged, the old and new check
sums must be equal mod 11. Since the only difference between the two check sums occurs at
the 𝑗 𝑡ℎ term, this means that
𝑗𝑎𝑗 ≡ 𝑗𝑏 (𝑚𝑜𝑑 11)
Therefore it follows that 11 | (𝑗𝑎𝑗 − 𝑗𝑏), i.e. 11 | 𝑗(𝑎𝑗 − 𝑏) and since 11 is a prime, this means
that either 11 | 𝑗 or 11 | (𝑎𝑗 − 𝑏). Because 1 ≤ 𝑗 ≤ 9, it’s clear that 11 doesn’t divide 𝑗. Thus,
we must have 11 | (𝑎𝑗 − 𝑏), i.e. 𝑎𝑗 ≡ 𝑏 (𝑚𝑜𝑑 11). However, since 0 ≤ 𝑎𝑗 , 𝑏 ≤ 9, we can have
𝑎𝑗 ≡ 𝑏 (𝑚𝑜𝑑 11) only when 𝑎𝑗 = 𝑏 which contradicts our assumption that 𝑎𝑗 ≠ 𝑏. Thus if
𝑎𝑗 ≠ 𝑏, the check digit can never remain same.
The proof of part (b) is similar as that of (a). Suppose that the digits 𝑎𝑗 and 𝑎𝑘 are interchanged,
where 1 ≤ 𝑗, 𝑘 ≤ 9, 0 ≤ 𝑎𝑗 , 𝑎𝑘 ≤ 9, 𝑗 ≠ 𝑘 𝑎𝑛𝑑 𝑎𝑗 ≠ 𝑎𝑘 (since, if 𝑎𝑗 = 𝑎𝑘 , then the ISBN
won’t change). Now again for the check digit to remain unchanged, the old and new check
sums must be equal mod 11. Since these two ISBN numbers only differ in the 𝑗 𝑡ℎ and 𝑘 𝑡ℎ
position and all other digits are same, so the two check sums will be equal mod 11 iff
𝑗𝑎𝑗 + 𝑘𝑎𝑘 ≡ 𝑗𝑎𝑘 + 𝑘𝑎𝑗 (𝑚𝑜𝑑 11)
Page 4 of 5
Note: This theorem can also be stated differently as a problem, e.g., ‘Show that in a 10-digit
ISBN, a single digit error or a transposition of any two different digits can always be detected
using the check digit’.
Page 5 of 5