Thursday, November 17, 2005

How to read 12-digit barcodes

HIGHLY nerdy but if you're ever caught in the midst of a plot for world domination and you find yourself faced with decoding a barcode on the fly (say, in order to stop a missile launch sequence), you'll be REALLY glad you have this site to refer to.

Just call me MacGyver, bitches.

Most barcodes in the US are 12-digit UPC 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.

1. 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.
2. 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."
3. Each UPC barcode begins and ends with 111 (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 11111. Each UPC barcode has 11111 in the middle.

4. 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 -- each code is 7 units wide)
5. So, the barcode above whose first two digits are 03 would start out "11132111411". Broken down this is "111-3211-1411" where 111 marks the beginning of the bar code and 3211 marks the digit 0 .

Tips

-Barcodes from soda cans, books, video store rentals, and all the rest which are less 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 digits 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. 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.

Warning!
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.

1 Comments:

Blogger Barcode Market said...

Great article by the great author, it is very massive and informative but still preaches the way to sounds like that it has some beautiful thoughts described so I really appreciate this article. Best Buy Upc Barcodes Online Services Provider

5:21 AM  

Post a Comment

<< Home