A universal product code (UPC) is a type of bar code. The code includes 12 numerals, plus a “guard bar” at the beginning that specifies the system being used, a bar that identifies the center, and another guard bar at the end that helps to catch errors.
Each numeral is coded in only one way, and nothing else besides the numerals can be included in a UPC: no decorative designs, no words, nothing.
Each product has a unique code with 12 numerals in a specific order. This means that each product has its own UPC code. The UPC barcodes are governed by GS1 (Global Standards 1), so that they can be used everywhere — that’s the universal part.
In fact, they can be used anywhere that there is a device that can read them. This generally means at the point of sale, but handheld devices are also available, and stores may have scanning kiosks for customers to use.
Does it seem as though we’d run out of numbers before we run out of products? It’s a matter of combinatorics. If we have two numerals, 0 and 1, we have two choices for the first numeral:
- 0
- 1
After we choose a 0, we have two choices for the second numeral:
- 00
- 01
Since this is also true if we chose a 1 for the first numeral, we can put our two numerals into four different orders:
- 00
- 01
- 10
- 11
With three numerals, 0, 1, and 2, we have three choices for the first numeral and each of those options gives us three choices for the second numeral, giving us nine options.
When we add a third numeral to any of these nine options, we again have three possibilities — giving us 27 choices in all (get paper and a pencil and try it out if you can’t imagine that).
Keep going and you’ll find that 12 numerals give us something like a trillion different possibilities. By the time we’ve used those up, we’ll probably have some different technology in place.
Right now, the numbers on the left of the central bar generally refer to the manufacturer and those on the right identify the specific product.
While the UPC scanner can read the bars, the numerals are put on the label so that a human being can read them.
For example, if a UPC label has been trimmed too closely and doesn’t allow enough room on either side, the scanner may reject it and a human being will have to type the numerals in.
Most of the time, though, the scanners work perfectly, ringing purchases up much more quickly than was possible before UPC codes.