Universal Product Code

From Wikipedia, the free encyclopedia

Jump to: navigation, search

The Universal Product Code (UPC) is a barcode symbology (i.e., a specific type of barcode), that is widely used in the United States and Canada for tracking trade items in stores.

Contents

[edit] Current code

In the UPC-A barcode, each digit is represented by a seven-bit sequence, encoded by a series of alternating bars and spaces. Guard bars, shown in green, separate the two groups of six digits.

The UPC encodes 12 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 one 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 consecutive 1s or 0s in order. Both are for reliability in scanning.

Since S, M, and E all include two bars, and each of the 12 digits of the UPC-A barcode consists of two bars and two spaces, all UPC-A barcodes consist of exactly (3 × 2) + (12 × 2) = 30 bars.

The UPC has only numerals, with no letters or other characters. The first digit L is the prefix. The last digit R is an error correcting check digit, allowing some errors in scanning or manual entry to be detected. UPC data structures are a component of GTINs (Global Trade Item Numbers). All of these data structures follow the global GS1 standards.

The bar-and-space patterns for each digit 0–9 are as follows:

Digit Pattern Digit Pattern
0 0001101 5 0110001
1 0011001 6 0101111
2 0010011 7 0111011
3 0111101 8 0110111
4 0100011 9 0001011

Before the Middle guard bars, a binary 1 is indicated by a bar, while a 0 is indicated by a space. After the Middle guard bars, however, the patterns are optically inverted. In other words, a 1 is now indicated by a space, and a 0 is now indicated by a bar. In the illustration above, the "4" digit (shown in detail), falls after the Middle guard bars, causing the pattern of bars and spaces to be inverted.

[edit] Prefixes

  • 0, 1, 6, 7, 8, or 9: For most products.
  • 2: Reserved for local use (store/warehouse), for items sold by variable weight. 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 RRRRR is either the weight or the price, with the first R determining which.
  • 3: Drugs by National Drug Code number. 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.
  • 4: Reserved for local use (store/warehouse), often for loyalty cards or store coupons.
  • 5: Coupons The Manufacturer code is the LLLLL, the first 3 RRR are a family code (set by manufacturer), and the last 2 RR are a coupon code. This 2-digit code determines the amount of the discount, according to a table set by the GS1 US, with the final R being the check digit.

By prefixing these with a 0, they become EAN-13 rather than UPC-A. This does not change the check digit. All point-of-sale systems can now understand both equally.

[edit] Check digit calculation

In the UPC-A system, the check digit is calculated as follows:

  1. Add the digits in the odd-numbered positions (first, third, fifth, etc.) together and multiply by three.
  2. Add the digits in the even-numbered positions (second, fourth, sixth, etc.) to the result.
  3. Find the result modulo 10 (i.e. the remainder when the result is divided by 10).
  4. If the result is not zero, subtract the result from ten.

For example, a UPC-A barcode (in this case, a UPC for a box of tissues) "03600029145X" where X is the check digit, X can be calculated by adding the odd-numbered digits (0 + 6 + 0 + 2 + 1 + 5 = 14), multiplying by three (14 × 3 = 42), adding the even-numbered digits (42 + 3 + 0 + 0 + 9 + 4 = 58), calculating modulo 10 (58 mod 10 = 8), subtracting from ten (10 − 8 = 2). The check digit is thus 2.

[edit] Zero-compressed UPC-E

To allow the use of UPC barcodes on smaller packages where a full 12-digit barcode may not fit, a 'zero-compressed' version of UPC was developed called UPC-E. This symbology differs from UPC-A in that it only uses a 6-digit code, does not use middle guard bars, and the end bit pattern (E) becomes 010101. The way in which a 6-digit UPC-E relates to a 12-digit UPC-A is determined by the last (right-hand most) digit. With the manufacturer code represented by X's, and product code by N's then:

Last digit UPC-E equivalent is UPC-A equivalent is
0 XXNNN0 0XX000-00NNN + check
1 XXNNN1 0XX100-00NNN + check
2 XXNNN2 0XX200-00NNN + check
3 XXXNN3 0XXX00-000NN + check
4 XXXXN4 0XXXX0-0000N + check
5 XXXXX5 0XXXXX-00005 + check
6 XXXXX6 0XXXXX-00006 + check
7 XXXXX7 0XXXXX-00007 + check
8 XXXXX8 0XXXXX-00008 + check
9 XXXXX9 0XXXXX-00009 + check

For example a UPC-E barcode with the number 654321 would expand to the UPC-A 065100004327. You can convert UPC-E back to UPC-A using this web utility.

UPC-E check digits are calculated using this expanded string in the same way as used by UPC-A. The resulting check digit is not added to the barcode, however, but is encoded by manipulating the parity of the six digits which are present in the UPC-E - as shown in the following tables:

Check digit Parity pattern
0 EEEOOO
1 EEOEOO
2 EEOOEO
3 EEOOOE
4 EOEEOO
5 EOOEEO
6 EOOOEE
7 EOEOEO
8 EOEOOE
9 EOOEOE
Digit to be encoded Odd parity pattern Even parity pattern
0 3-2-1-1 1-1-2-3
1 2-2-2-1 1-2-2-2
2 2-1-2-2 2-2-1-2
3 1-4-1-1 1-1-4-1
4 1-1-3-2 2-3-1-1
5 1-2-3-1 1-3-2-1
6 1-1-1-4 4-1-1-1
7 1-3-1-2 2-1-3-1
8 1-2-1-3 3-1-2-1
9 3-1-1-2 2-1-1-3

Our example code 654321, therefore, would become 1-1-1 4-1-1-1 1-2-3-1 2-3-1-1 1-4-1-1 2-2-1-2 2-2-2-1 1-1-1-1-1-1. The resulting barcode would look roughly like this:

Image:UPC-E-654321.png

[edit] Other variations

UPC in its most common usage technically refers to UPC-A. Other variants of the UPC exist.

  • UPC-B is a 12-digit version of UPC with no check digit, developed for the National Drug Code and National Health Related Items Code.
  • UPC-C is a 12-digit code with a check digit.
  • UPC-D is a variable length code (12 digits or more) with the 12th digit being the check digit. These versions are not in common use.
  • UPC-5 is a 5-digit supplement to the UPC code used to indicate suggested retail price for books.

As the UPC has become technologically obsolete, it is expected that UPC-B and UPC-C will disappear from common use by the 2010s. The UPC-D standard may be modified into EAN 2.0 or be phased out entirely.

[edit] Printing considerations

GTIN-12 number encoded in UPC-A barcode symbol. First and last digit are always placed outside the symbol to indicate Quiet Zones that are necessary for barcode scanners to work properly.

Dimensions

UPC-A Bar code symbols can be printed at various densities to accommodate variety of printing and scanning processes. The significant dimensional parameter is called X-dimension, the ideal width of single module element. The X-dimension has to be constant in UPC-A symbol. The width of each bar (dark bar) and space (light bar) is determined by multiplying the X-dimension by the module width of each dark bar or light bar (1,2,3, or 4).

The X-dimension for the UPC-A at the nominal size is 0.33 mm (0.013 in.). UPC-A can be reduced or magnified in the range of 80% to 200%.

Nominal symbol height for UPC-A is 25.9 mm (1.0 in.). In UPC-A the dark bars forming the left, centre, and right Guard Bar Patterns are extended downwards by 5 times X-dimension. This also applies to the bars of the first and the last symbol characters of UPC-A symbol. See illustration.

Quiet zone (light margin)

The minimum Quiet Zone width required by the UPC-A bar code symbol is 9 x X-dimension on both the left and right sides. UPC-E requires 9 X-dimension units on the left side and 7 on the right. (Source; UPC Symbol Specification Manual).

Barcode text

Exactly 12 digits must be printed below the UPC-A barcode.

[edit] History

Wallace Flint proposed an automated checkout system in 1932 using punch cards. Bernard Silver, Franklin Light, and Norman Joseph Woodland developed a bull's-eye style code, patented it (filed in 1949 and received in 1952). In the 1960s railroads experimented with a multicolor barcode for tracking railcars, but eventually abandoned it.

A group of grocery industry trade associations formed the Uniform Grocery Product Code Council which with consultants Larry Russell and Tom Wilson of McKinsey & Company, defined the numerical format of the Uniform Product Code. Technology firms including Charegon, IBM, Litton-Zellweger, Pitney Bowes-Alpex, Plessey-Anker, RCA, Scanner Inc. and Singer proposed alternative symbol representations to the council. In the end the Symbol Selection Committee chose to slightly modify, changing the font in the human readable area, the IBM proposal designed by George J. Laurer.

Although various companies had UPC Scanning systems in the back of stores, the first UPC marked item ever scanned at a retail checkout (Marsh's supermarket in Troy, Ohio) was at 8:01 a.m. on June 26, 1974, and was a 10-pack of Wrigley's Juicy Fruit chewing gum.[1] The entire shopping cart also had barcoded items in it, but the gum was merely the first one picked up by the cashier. This item is currently on display at the Smithsonian Museum in Washington, D.C.[2]

[edit] Development of the IBM UPC proposal

Around 1970 IBM at Research Triangle Park NC assigned George Laurer to solve the problem of a Super Market Scanner and label. In February 1971 Heard Baumeister joined Laurer then later William Crouse joined the effort. After many, many months they had made no progress. They were aware of the RCA Bulls Eye Label that could be scanned with a simple straight line laser scanner but a readable label was far too large. Although Litton Industries proposed a Bull’s Eye symbol cut in half to reduce the area it was still too large and presented the same ink smear printing problems as the RCA symbol. The redundancy and checking ability were removed completely.

Image:UPC HKB.jpg

The UPC Label above shows the general characteristics of Baumeister's proposals. He did not suggest any specific bar code so the image does not attempt to show exact coding of the ten digits required at that time. Also Baumeister's proposal did not include specific guard bars on the sides and center.

A change in management at IBM resulted in Baumeister, Crouse, and Laurer being assigned to different departments. Laurer was given sole responsibility for inventing and creating a viable code and symbol that would satisfy all the requirements. He made several attempts based using the Delta C code invented by Crouse. Finally he devised a new code that also read distances from leading to leading and trailing to trailing edges of bars making it much less sensitive to the printer’s ink spreading degradation. Although this code was based upon the Delta C code, it required far less area. Unfortunately it still did not meet the 1.5 sq. in. requirement. Laurer’s final breakthrough was using the unique characteristics of his new code to invent a way to divide the symbol in halves in such a way that they could be reassembled in the correct order by the scanner. This reduced the necessary area by about 40% to 1.5 by 1.0 inches.

The following table shows the workable labels, available in the early 1970s, with their sizes.

Check digit Parity pattern
Label Dimensions Area
Bulls-eye with Morse Code Large Large
Bulls-eye with Delta B 12.0" diameter 113.10 sq. in.
Bulls-eye with Delta A 9.0" diameter 63.62 sq. in.
Baumeister 1st w/ Delta B 6.0" × 5.8" 34.80 sq. in.
Baumeister 2 halves w/ Delta B 6.0" × 3.0" 18.00 sq. in.
Baumeister 2 halves w/ Delta A 4.5" × 2.3" 10.35 sq. in.
Baumeister with Delta C 1.5" × 0.9" 1.35 sq. in.

This is assuming a Bull’s eye with the same information and reliable readability.

Baumiester and Crouse were no longer involved in the creation of the code and symbol. Crouse was responsible for designing a hand held device to read Laurer’s symbol, Baumiester did theoretical work on scanner designs. D. Savir, a mathematician was given the task of proving the symbol could be printed and would meet the reliability requirements. N. J. Woodland, the inventor of the Bull’s Eye code was responsible for writing the IBM proposal to the selection committee. A group under the direction of Art Hamburgen in Rochester designed and built a prototype scanner incorporating the architecture patented by Laurer. Dr. Sodastrum was the lead engineer on the scanner optics.

December 1, 1972 IBM presented Laurer’s proposal to the Super Market Committee in Rochester Minnesota, the location where IBM would develop the scanner. During the presentation Crouse gave a lab demonstration where he read UPC like labels with a simple hand held wand. In addition to reading regular labels he read the large two page center fold label in the proposal booklet. He then turned to a page showing a photo of labeled items sitting on a table. The labels were small and flawed due to the resolution of the printed photo but the wand read many of them. This demonstration showed the robustness of the code and the proposal was accepted.

Laurer continued his career with the UPC. He became known as the inventor of the UPC; without his persistence there might not have been an IBM proposal. Baumeister and Crouse moved on to other activities, Baumeister prior to the Rochester proposal and Crouse immediately after.

[edit] Technical notes

The 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 GS1 US mandated all retail systems in the United States and Canada be able to recognize both UPC and EAN by January 1, 2005 [3].

UPC usage notes:

  • Currently all products marked with an EAN will be accepted in North America in addition to those products already marked with a UPC.
  • Any product with an existing UPC does not have to be remarked with an EAN.
  • In North America the EAN adds 40% more codes mainly by adding 10 to 13 to the 00 to 09 (0 to 9 in UPC) already in use. This is a powerful incentive to phase out the UPC.

[edit] See also

[edit] References

  1. ^ Nelson, Benjamin (1997). From Punched Cards To Bar Codes. 
  2. ^ Harvard Magazine, September - October 2005
  3. ^ "GTIN: Global Trade Identification Number Information". http://www.gtin.info/sunrise.html. Retrieved on 2008-08-22. 

[edit] External links


Personal tools