To begin with, grab something with a UPC code on it. There should be a number to the left, two sets of 5 numbers in the middle, and another number to the right. The single digit and the set of five on the left are used to identify the manufacturer, the set of five on the right identifies the product, and the digit on the right is a check digit.

Part of the trick to reading UPC's is being able to read between the lines - the white space is just as important as the black space. The UPC should start with a black line, a white line, another black. This should also be on the right edge. These markers are used like mile markers... They just help the laser scanner make sure it's reading right. In the center there will be a white, black, white, black, while group, with the lines usually going down a little further than the rest.

ValueLeft Code Right Code
000011011110010
100110011100110
200100111101100
301111011000010
401000111011100
501100011001110
601011111010000
701110111000100
801101111001000
900010111110100

Left Start Code=101
Right Start Code=101
Center Code=01010

While the UPC may look like a combination of thick lines and thin lines, it is actually nothing but thin lines; Two thin black lines next to each other look like a thick line. Each number of the UPC is represented by 7 thin lines, and the code to decipher them is given in the table. Count black lines as a 1 and white lines as a 0. As you might have guessed, lines to the left of the center are encoded using the "Left Code" in the table, and those on the right with the "Right Code". For the sake of well-roundedness, notice that the Left Code is the compliment of the Right Code (ie it's the opposite).

The digit on the right (the check digit) is used to let the scanner know if it's reading correctly. To get it, sum the odd-spaced numbers (ie #1, #3, #5, etc) and then multiply that sum by 3. Add to this the sum of the even-spaced numbers. The check digit is the number you would need to add to make your number a multiple of 10.

As an example, say I want to make a UPC with a manufacturer code of 012345 and a product code of 67890. The UPC would be:

101 0001101 0011001 0010011 0111101 0100011 0110001 01010 1010000 1000100 1001000 1110100 1110010 1001110 101
Left   0       1       2       3       4       5    Center   6       7       8       9       0       5    Right

To get the check code, we find 3*(0+2+4+6+8+0)+(1+3+5+7+9)=85. Since 90 is the next multiple of 10, 5 must be added, and 5 is the check code.

In a nutshell, that's it - if I've made any typos or forgotten anything shoot me an e-mail. A good place for more information (in fact, probably better than this place) is beakman.com