Most bar codes in the US are 12-digit UPC (Universal Product Code)
barcodes, with ten digits at the bottom of the code and one small
number to each side. Impress your friends by asking them to select
a random item from the kitchen with a removable label and cut the
numbers off of the UPC barcode; you can then proceed to read the
numbers encoded in the lines.
- Note that barcodes are made up of both black and white lines.
The white spaces in between the black lines are part of the
code.
- Understand that there are four different thicknesses to the
lines. Henceforth, the skinniest line will be referred to as "1,"
the medium-sized line as "2," the next largest line as "3." and the
thickest is "4."
- Each UPC barcode begins and ends with 101 (thin black, thin
white, thin black). In the very middle of the barcode, you will
notice two thin black lines sticking down between the numbers. The
thin white between them, as well as the thin whites to either side,
make up a 01010. Each UPC barcode has 01010 in the middle.

- Recognize that each digit, including the small numbers that
begin and end the barcode, has its own unique four-line set. 0 =
3211, 1 = 2221, 2 = 2122, 3 = 1411, 4 = 1132, 5 = 1231, 6 = 1114, 7
= 1312, 8 = 1213, 9 = 3112. (Note that the sum of bar widths
numbers is 7 for all codes because each code is 7 units wide.)
- So, the barcode above whose first two digits are 03 would start
out "10132111411". Broken down this is "101-3211-1411" where 101
marks the beginning of the bar code and 3211 marks the digit 0
.
- Barcodes from soda cans, books, video store rentals, and all
the rest which are fewer than 12 digits only use the
white/black/white/black scheme.
- Memorizing the thickness of each line size takes some time (as
does memorizing each digit's line sequence), but it becomes easier
with practice.
- Notice that the line colors are reversed after the center-line:
The lines of the digits to the left are white/black/white/black
whilst to the right they are black/white/black/white. This provides
some error checking and allows the reader to know the direction in
which it is scanning a code. It is also crucial so that the barcode
ends with a bar rather than a space. So, actually, each digit has
two codes.
- Recognize that each digit is made up of seven equally spaced
lines. So you can see from the image above that the digit 4 is made
up of the 7 black and white lines in the order of 1011100 where 1
is black and 0 is white. These seven small lines become 1132 in the
simplified thick or thin line system.
- The first code is the manufacturer of the product. Many times
the "Brand-X" is made by the same manufacturer (e.g., Prestone
antifreeze and the Advanced Autoparts generic, 3M "Post-its" and
the generic sold at OfficeMax). While there's no guarantee the
quality is the same, it's probably just the same item with
different coloration in a different package.
- When the numbers that the barcode represents are printed below
the bars, the first and last digits are often printed outside of
the bars. While the first number is part of the company number, the
last number is a check digit (known as a Mod 10 check digit). This
number is calculated based on the other digits in the number.
- You can use the check digit yourself, to ensure that you've
figured out the other digits correctly. Add together all the digits
in odd-numbered positions (there will be 6, from the 1st to the
11th) and multiply that sum by 3. Then add each digit in an
even-numbered position (of which there are 5) to that sum. The
check digit will be whatever number you need to add to that end
result sum to make it a multiple of 10 (i.e., (-sum) mod 10).
In the above example, you get 3*(0+6+0+2+1+5) + (3+0+0+9+4) = 42 +
16 = 58. So you would need to add a 2 to 58 to get a multiple of
ten.
Note- the reason the scheme is rather complex is to allow scanning
machines to detect all single-digit errors, as well as almost all
swaps of two adjacent digits.
[edit]
Warnings
- You will not do well if you have poor eyesight.
- Outside the US & Canada, the similar 13-digit EAN barcode
system is more prevalent. The EAN contains an additional digit used
as part of a country code.
[edit]
Things You'll Need
- A 12-digit UPC barcode
- Good Eyesight
[edit]
Sources and Citations
Was this article accurate?
Yes
No
Thanks to all authors for creating a page that has been read 246,579 times.