![]() The Mathematics of Barcodes |
|
Activity 3: Coding Errors
Part AThe UPC-A is designed with a check number (the 12th number in the sequence) that catches all single number errors in the modulo 10 numbering system. However, if two numbers are in error, there is the possibility that the two mistakes will "cancel each other out" and the scanner will not catch the errors. Although any two numbers in the encoding scheme that were in error could create a problem, the most likely mistake in recording two numbers is that of transposition (for example, 68294 68924). Because of the way that the system is designed, when two numbers are transposed most of these errors are caught by the mod 10 coding formula and resulting check number, but some errors are not picked up.In order for the UPC-A number to be valid, the twelve numbers in the bar code must satisfy the following condition: 3a1 + a2 + 3a3 + a4 + 3a5 + a6 + 3a7 + a8 + 3a9 + a10 + 3a11 + a12 º 0 (mod 10). A transposition error would go undetected if 2 numbers x and y in the bar code fit the following form: 3x + y º x + 3y.
Part BThe binary number system is used to develop the code used for the UPC-A system. This lesson will investigate this base 2 system which is also an integral part of computer technology.First let us compare the base 2 and base 10 systems to show their similarities and differences. The base 10 system is a place value system consisting of the following places: ones place (100), tens place (101), hundreds place (102), thousands place (104), and so on. The base 2 system consists of a ones place (20), twos place (21), fours place (22), eights place (23), and so on. In base 10, the largest numeral that can be used in a particular place is 9, with the range of possible numbers being 0 through 9. In base 2, the largest numeral that can be used is 1 with 0 being the only other choice of digit. The number 13 in base 10 is represented by the number 1101 in base 2 with the 13 being made up of 1 eight, 1 four, 0 twos, and 1 one. The number 1110010 in base 2 which is the right hand parity code for zero in the UPC-A system, is 114 in base 10. Convert the left and right hand parity numbers in the table below into base 10. UPC ENCODING SCHEME
Area 10 Mathematics and Technology Professional Development Center Permission is granted to duplicate these materials for classroom use.
Last updated on 1/30/1999 |