Universal Product Code
Encyclopedia : U : UN : UNI : Universal Product Code
The Universal Product Code (UPC) is one of a wide variety of bar code languages called symbologies. The UPC was the original barcode widely used in the United States and Canada for items in stores.
History
Wallace Flint proposed an automated checkout system in 1932 using punch cards. [link] Joseph Woodland patented a bullseye style code in 1952 and the first commercial use of barcodes was in 1966. [link] For a more detailed history see: BarcodesIn 1970 Logicon Inc. created the Universal Grocery Products Identification Code (UGPIC). In 1970 it was used by Monarch Marking in the United States and Plessey Telecommunications in the United Kingdom. [link]
A group of grocery industry trade associations formed the Uniform Grocery Product Code Council which with McKinsey & Co., a consulting firm, defined the predecessor to the Uniform Product Code. In 1973 George J. Laurer developed the Universal Product Code.[link]
The first item to be placed under a UPC scanner in a retail store was a 10-pack of Wrigley's Chewing Gum at a Marsh Supermarket in Troy, Ohio, on June 26, 1974.
Current code
The UPC (now officially EAN.UCC-12) encodes twelve decimal digits as SLLLLLLMRRRRRRE, where S (start) and E (end) are the bit pattern 101, M (middle) is the bit pattern 01010 (called guard bars), and each L (left) and R (right) are digits, each represented by a seven-bit code. This is a total of 95 bits. The bit pattern for each numeral is designed to be as little like the others as possible, and to have no more than four 1s or 0s in order. Both are for reliability in scanning.
The UPC is only numerals, with no letters or other characters. The first L digit is 0 for ordinary items, 3 for pharmaceuticals, 2 for variable-weight items, and 5 for coupons (though stores often ignore this and use 000000 or 999999). The rest of L is the manufacturer code. The first five R digits are the product code assigned by the manufacturer. The last digit R is a check digit, so that errors in scanning or manual entry can be detected. In the UPC-A system, the check digit is calculated as follows:
- Add the digits in the odd-numbered positions (first, third, fifth, etc.) together and multiply by three.
- Add the digits in the even-numbered positions (second, fourth, sixth, etc.) to the result.
- Subtract the result from the next-higher multiple of ten. The answer is the check digit.
Pharmaceuticals in the U.S. have the remainder of the UPC as their National Drug Code (NDC) number; though usually only over-the-counter drugs are scanned at point-of-sale, NDC-based UPCs are used on prescription drug packages as well for inventory purposes. Variable-weight items, such as meats and fresh fruits and vegetables, are assigned a UPC by the store if they are packaged there. In this case, the LLLLL is the item number, and the _RRRR is either the weight or the price, with the first R determining which. Likewise, coupons are supposed to have the coupon code in LLLLL, the amount to be taken off in _RRRR, and whether that amount is a percent or a literal amount encoded in the first R.
U.P.C. Prefixes
- 0, 1, 6, 7, 8, or 9 for most products
- 2 reserved for local use (store/warehouse), for items sold by variable weight
- 3 drugs by National Drug Code number
- 4 reserved for local use (store/warehouse), often for loyalty cards
- 5 coupons, though many stores ignore this and use others
Representation
In the barcode, each number is represented by two bar and space configurations. One configuration is used in the "L" digits, while another is used in the "R" digits. This is done so that the barcode can be scanned forwards or backwards, and the scanner can determine from which direction the code is being scanned so that it can be registered correctly. If it were not for this, products could easily be registered incorrectly.Each digit in UPC-A has two forms. In EAN there are two additional forms so that each digit can be encoded with even or odd parity. For instance, the number 6 can be encoded as:
- 0101111 (In the left half of a UPC-A barcode, or odd parity in the left half of an EAN barcode)
- 1010000 (In the right half of a UPC-A barcode, or odd parity in the right half of an EAN barcode)
- 0000101 (In even parity in the left half of an EAN barcode)
- 1111010 (In even parity in the right half of an EAN barcode)
The (L) codes for the ten digits are:
- 0: 0001101
- 1: 0011001
- 2: 0010011
- 3: 0111101
- 4: 0100011
- 5: 0110001
- 6: 0101111
- 7: 0111011
- 8: 0110111
- 9: 0001011
The (R) codes:
- 0: 1110010
- 1: 1100110
- 2: 1101100
- 3: 1000010
- 4: 1011100
- 5: 1001110
- 6: 1010000
- 7: 1000100
- 8: 1001000
- 9: 1110100
If you want to read barcodes yourself and not need to count one, zero, zero, one..., or have to memorize those, there is an easier "code" to reading barcodes. The bars and spaces in barcodes have four different lengths, or values. A digit in a UPC barcode consists of two spaces and 2 bars, the lengths of the digit always equalling seven. The lengths can be called 1, 2, 3 and 4. 1 is the thinnest, 2 is twice as wide as 1, 3 is as wide as three 1 bars, and 4 is the widest, equal to four 1 bars, or two 2 bars.
(L) codes: 0 : 3-2-1-1 1 : 2-2-2-1 2 : 2-1-2-2 3 : 1-4-1-1 4 : 1-1-3-2 5 : 1-2-3-1 6 : 1-1-1-4 7 : 1-3-1-2 8 : 1-2-1-3 9 : 2-1-1-3For example, let's say the first digit in a barcode, after the 1-1-1 start code, is one. You would see a space 1 long, a bar 2 long, a space 2 long and a bar 2 long. After the first six digits, there are five 1's (space bar space bar space), this is to make sure the barcode ends in a bar, not a space. After that, the digits on the right start with a bar and end with a space, the inverse of the digits on the left. Then the ending 1-1-1 sequence, which is bar-space-bar again.
Expansion
EAN was developed as a superset of UPC, adding an extra digit to the beginning so that there would be plenty of numbers for the entire world. The prefix digit 0 has been reserved for UPC, and in fact the Uniform Code Council has mandated all retail systems be able to recognize both UPC and EAN by January 1,2005. This means that products marked with an EAN will be accepted in the US and Canada in addition to those products already marked with a UPC. Any product marked with a UPC does not have to be remarked with an EAN. In addition, this also expands the numbers available for the U.S. and Canada by 40%, adding 10 to 13 to the 00 to 09 (0 to 9 in UPC) already in use.External links
- [I Need a U.P.C. For My Product(s)]
- [25th Anniversary Review of U.P.C. Impact (pdf download)]
- [The Barcode Symbology] — Preview different barcodes.
- [Details on the checksum algorithm]
- [The Barcode FAQ] — links to barcode related white papers.
- [George J. Laurer's personal web site.]
- [The Internet UPC Database]
- [How to Read 12 Digit UPC Barcodes - WikiHow]
- [Online UPC Bar Code Generator]
- [Why Do I Need A Barcode?]
- [UPC-A Encoding] Learn how it works, see how it converts to a barcode
Notes
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
