Used with permission. This Tutorial was created by George Laurer, the creator of the U.P.C. Barcode Symbol. Copyright ID History Museum 2007-2012 http://www.idhistory.com
The U.P.C. code and symbol was invented to only satisfy the need of the grocery industry in 1973. At that time there were only a few hundred large grocery manufacturers or “converters” as they were sometimes called. They had a great influence on the project and insisted that a method be devised to allow the zeros in their manufacturer number and their item numbers to be suppressed and provide for a symbol that required less area. It was felt that this was absolutely necessary if they were to put symbols on small packages like Jello, gum, and cigarettes.
The ingenious solution centered on the character sets used for the left and right halves of the symbol. Version A was designed to be read as two separate halves and assembled into one 12 digit number by the scanner. The scanner determined that a set of 6 numbers was the left half of a number if it was encoded using all bar/space combinations from the “odd parity character set”. The scanner determined that a set of 6 numbers was the right half of a number if it was encoded using all bar/space combinations from the “even parity character set”. It was realized that if three digits were from the odd parity character set and three were chosen from the even parity character set, there would be 20 permutations available. This essentially provided two additional digits with very little degrading of the checking provided by the parity of the characters. Thus one could encode two sets of 7 numerical digits in one half of the symbol and the scanner would require no modifications to find and read the smaller symbol.
The solution was to encode the check digit (Ck) and the system number (Sn) by choosing the proper even-odd parity characters from a table. Sn would only have a value of 0 or 1. Later, when the need for a 13th character arose to satisfy the needs of Europe, Version E system number 1 was dropped and those patterns used for EAN-13.
Although there were only a hundred or so very large manufacturers, it was understood that to gain wide acceptance of the U.P.C. provisions would have to be made for all grocery converters to have at least a few Version E symbols. To accommodate this requirement the last of the printed 6 digits defines the compression scheme used. The largest manufactures are able to encode 1000 items in Version E the next largest 100, the next largest 10, and the smallest manufacturer can encode 5 item numbers in Version E. The UCC was only concerned with grocery manufactures and the converters would all be given System Number 0 prefixes. Care was taken to issue manufacturer numbers ending with one or more zeros based on their size. The compression schemes follow.
Companies assigned a 5 digit manufacture number ending in 000, 001 or 002 of which there could be 300, are able to encode 1000 numbers for use in Version E.
[Sn-M1 M2 m3 0 0– 0 0 I3 I4 I5-Ck] would be encoded as [M1 M2 I3 I4 I5 m3]
Companies assigned a 5 digit manufacture number ending in 003, through 009 of which there could be 700, are able to encode 100 numbers for use in Version E.
[Sn-M1 M2 M3 0 0–0 0 0 I4 I5-Ck] would be encoded as [M1 M2 M3 I4 I5 “3”]
Companies assigned a 5 digit manufacture number ending in 0 of which there could be 10,000, are be able to encode 10 numbers for use in Version E.
[Sn-M1 M2 M3 M4 0–0 0 0 0 I5-Ck] would be encoded as [M1 M2 M3 M4 I5 “4”]
Companies assigned a 5 digit manufacture number not ending in 1 through 9, the remaining 89,000 of the 100,000, are able to encode 5numbers for use in Version E.
[Sn-M1 M2 M3 M4 M5–0 0 0 0 I5-Ck would be encoded as [M1 M2 M3 M4 M5 I5]
In all Version E formats, the check digit (Ck) is encoded by choosing the proper even-odd parity characters from a table. The system number (Sn) value of 0 is implied. Although only manufactures that are issued prefixes starting with system number 0, can use Version E, 100,000 manufactures are able to encode over one half a million Version E symbols.
When the scanner reads half a symbol the logic determines what type of symbol it is by noting the parity patterns. If the characters are all encoded using the “even” character set, the half symbol is the right half of a Version A or EAN-13. If they are all from the “odd” character set it is the left half of a Version A symbol (the Country Flag* is 0 in that case). If three characters are from the “odd” set and three characters are from the “even” set, the half is either the left half of an EAN-13 or it is a Version E symbol. If the the first character of the latter halves is from the “even” character set it is a Version E symbol, (Country Flag is 0). The number is expanded by interrogating the sixth digit character. The check value is found by a table lookup of the character parity parity pattern. In the case of EAN, the fist characin is from the “odd” character set and the Country Flag* is found by a table lookup. Any combination of characters from the “odd” and “even” sets other than those described, is invalid and is designated as a reading error.
* Country Flags some country designations also use the system number and the first digit of the manufacturer’s number to further subdivide the Country Flag.
This Tutorial was created by George Laurer, the creator of the U.P.C. Barcode Symbol.