![]() |
|
Coding and Decoding for the Universal Product Code |
|
The Universal Product Code was the first bar code symbol-based system widely adopted. This code was needed for product marketing in order to place a symbol on a package and allow the symbol to be scanned without any other handling of the package. In general, a universal product code allows quick, accurate identification. More specifically, the details of a universal product code entail error rates, relative distances, left and right digits, odd and even parity, and product number databases. The UPC was created by the grocery industry on April 3, 1973, who established the version seen on grocery store items. The Universal Product Code is related to Discrete Mathematics in the following ways; (1) encoding, (2) decoding, (3) parity, and (4) the use of symbols. This paper will discuss the Universal Product Code and the role that Discrete Mathematics has in this relay of information.
"In today's modern world of communication, data items are constantly being transmitted from point to point. This transmission may range from the simple task of a computer terminal interacting with a mainframe computer located 200 feet away, to the more complicated task of sending a signal thousands of miles away via a satellite that is parked in an orbit 20,000 miles from the earth, or to a telephone call or letter to another part of the country." Coding information, however redundant, can sometimes help to detect transmission errors and sometimes even correct them. Encoding a 'message', or unit of information, allows a person to send this information from one point to another over a transmission channel and decrease the chance that the received message is different than that original message. Certain encoding functions are used to pass and represent every word in these messages. Errors sometimes occur in transmission but these errors can sometimes be detected and corrected in decoding. Decoding a message properly requires that the received words be correct. However, if they are not, decoding improperly received words may or may not be correct. "Universal Product Code 'version A' is the basic version of UPC and is usually the version seen on grocery store items" where symbols are used to encode the first 10 digits, an eleventh digit for type of product, and a twelfth digit for a 'modulo check digit'. A modulo check digit is used with various barcode symbologies. They are always used with UPC-A and EAN-13 barcodes. To determine the modulo check digit for UPC-A, one would add all the odd digits (first, third, etc.) and multiply the total by 3, then add the total of the even digits. Subtract the resulting total from the next highest multiple of ten. (If the total was 74, subtract it from 80.) The resulting character is the check digit. An UPC-A barcode is divided into four areas: (1) the number system, a single digit which identifies the "type" of product, (2) the manufacturer code, a unique code assigned by the UCC Council to each manufacturer or company which distributes goods, (3) the product code, a unique code assigned by the manufacturer who is free to assign product codes to each of their products without consulting any other organization and (4) the check digit, which, as described above, ensures that the product has been scanned correctly. Normally the number system digit is printed just to the left of the barcode, the check digit just to the right of the barcode, and the manufacturer and product codes are printed just below the barcode. The left hand characters in the code have odd parity; the right have even parity. 'Parity' is a form of error detection in Discrete Mathematics that uses a single bit to represent the odd or even quantities of '1's and '0's in the data. Parity usually consists of one parity bit for each eight bits of data. In the UPC, parity is used to determine between left and right hand characters; the left hand characters use 3 or 5 bits (an odd parity) and the right hand characters use 2 or 4 bits (an even parity). The UPC symbol is the bar code that is displayed on the packaging. A picture of this is displayed below. |
|
In the way that it uses encoding, decoding, parity, and symbols, the Universal Product code is related to Discrete Mathematics. Discrete math is a hard subject to define. Joseph G. Rosenstein, the Associate Director for Education of the Center for Discrete Mathematics and Theoretical Computer Science (DIMACS) and Director of the Leadership Program in Discrete Mathematics, defines Discrete Mathematics as the following:
"Discrete mathematics is the branch of mathematics that deals with arrangements of distinct objects. It includes a wide variety of topics and techniques that arise in everyday life, such as how to find the best route from one city to another, where the objects are cities arranged on a map. It also includes how to count the number of different combinations of toppings for pizzas, how best to schedule a list of tasks to be done, and how computers store and retrieve arrangements of information on a screen. Discrete mathematics is the mathematics used by decision-makers in our society, from workers in government to those in health care, transportation and telecommunications. Its various applications help students see the relevance of mathematics in the real world."Because of these applications, discrete mathematics is a beneficial aid to tools such as the Universal Product Code. Interestingly enough, discrete mathematics entered the education system around the same time as computers. This is because in addition to the concepts above, data storage and network systems are a form of discrete math. That is why it is important for computer science majors to have an understanding of Discrete topics. |
|
|