436
Relations, Functions, and Matrices
In the ISBN-13, there is an additional block of three digits in the front that
identifies the type of industry. For a published book, this block is always 978. The
next three blocks agree with the ISBN-10, but the final block, again a check digit,
is computed differently. If the first 12 digits of the ISBN-13 are
a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12
then the 13th digit, the check digit C, is computed from the 12 digits by the formula
c3 ∙
6
i=1
a 2i + ∙
5
i=0
a 2i+1 + Cd mod 10 = 0
—that is, three times the sum of all the even digits + the sum of all the odd digits
plus the check digit should give a multiple of 10.
The ISBN-13 for The Cat in the Hat is 978-0-394-80001-1. The check digit C
(digit 13) is computed from
9 + 3 # 7 + 8 + 3 # 0 + 3 + 3 # 9 + 4 + 3 # 8 + 0
+ 3 # 0 + 0 + 3 # 1 + C = 99 + C
so C = 1 to make a total of 100, a multiple of 10.
PRaCtiCe 48
a. If an ISBN-10 begins with 0-534-37488, what is the check digit?
b. If digits in this number are transposed to 0-534-37848, what is the check digit?
■
example 56
The UPC-A (Universal Product Code) is the common bar code found on all
goods in stores (food, magazines, and so on). It is an encoding of a 12-digit number, where the first digit is a sort of classification digit, the next five digits are a
manufacturer code, the next five digits are the product code, and the last digit is a
check sum digit. Each digit is assigned a 7-bit binary code, but this is not the usual
binary number representation; for example, the binary code for 5 is 0110001. The
7-bit code for any single digit is represented by a pattern of vertical bars and spaces
(space-bar-space-bar if the digit occurs in the left half of the 12-digit string, barspace-bar-space if it occurs in the right half). The spaces and bars can have varying
widths from 1 to 4, 1 being the thinnest and 4 the thickest. If a 5 occurs in the left half
of the 12-digit string, its binary code would be represented by a space of width 1,
a bar of width 2, a space of width 3, and a bar of width 1.
0 1 1 0 0 0 1
Relations, Functions, and Matrices
In the ISBN-13, there is an additional block of three digits in the front that
identifies the type of industry. For a published book, this block is always 978. The
next three blocks agree with the ISBN-10, but the final block, again a check digit,
is computed differently. If the first 12 digits of the ISBN-13 are
a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12
then the 13th digit, the check digit C, is computed from the 12 digits by the formula
c3 ∙
6
i=1
a 2i + ∙
5
i=0
a 2i+1 + Cd mod 10 = 0
—that is, three times the sum of all the even digits + the sum of all the odd digits
plus the check digit should give a multiple of 10.
The ISBN-13 for The Cat in the Hat is 978-0-394-80001-1. The check digit C
(digit 13) is computed from
9 + 3 # 7 + 8 + 3 # 0 + 3 + 3 # 9 + 4 + 3 # 8 + 0
+ 3 # 0 + 0 + 3 # 1 + C = 99 + C
so C = 1 to make a total of 100, a multiple of 10.
PRaCtiCe 48
a. If an ISBN-10 begins with 0-534-37488, what is the check digit?
b. If digits in this number are transposed to 0-534-37848, what is the check digit?
■
example 56
The UPC-A (Universal Product Code) is the common bar code found on all
goods in stores (food, magazines, and so on). It is an encoding of a 12-digit number, where the first digit is a sort of classification digit, the next five digits are a
manufacturer code, the next five digits are the product code, and the last digit is a
check sum digit. Each digit is assigned a 7-bit binary code, but this is not the usual
binary number representation; for example, the binary code for 5 is 0110001. The
7-bit code for any single digit is represented by a pattern of vertical bars and spaces
(space-bar-space-bar if the digit occurs in the left half of the 12-digit string, barspace-bar-space if it occurs in the right half). The spaces and bars can have varying
widths from 1 to 4, 1 being the thinnest and 4 the thickest. If a 5 occurs in the left half
of the 12-digit string, its binary code would be represented by a space of width 1,
a bar of width 2, a space of width 3, and a bar of width 1.
0 1 1 0 0 0 1
