Every product has a unique 12-digit UPC code, which indicates both the manufacturer (first 6 digits) and the product (last six digits). Different sizes, different flavors, different colors - all have their own special codes. Stores can easily keep track of their inventory and update prices. They can even keep track of what customers are buying. Checkout is faster and more accurate because the code is read by a laser, rather than by a person.
One of the things you first notice about the black stripes in a bar code is that they are of different widths. There are skinny bars, bars twice the thickness of the skinny ones, bars three times the thickness of the skinny bars, and bars four times the thickness of the skinny ones. Actually, bar codes also include the white strips between the black bars, and they also come in all four widths. We'll call single-width black bars 1B, triple width white bars 3W, and so on. The ten numerical digits are given by:
0 = 3W 2B 1W 1B
1 = 2W 2B 2W 1B
2 = 2W 1B 2W 2B
3 = 1W 4B 1W B1
4 = 1W 1B 3W 2B
5 = 1W 2B 3W 1B
6 = 1W 1B 1W 4B
7 = 1W 3B 1W 2B
8 = 1W 2B 1W 3B
9 = 3W 1B 1W 2B
Every bar code reads from left to right. The first three stripes are always the same (1B 1W 1B). This is the start code, and it tells the computer reading it where the code will begin. Then you start reading four bars at a time. You will notice that the numbers that correspond to the bar code are also written along the bottom. The last three bars are 1B 1W 1B again, which is a stop code.
Maybe you're thinking - there are lots and lots of different products out there - are there enough UPC codes for all of them? No worry - there are actually 1,000,000,000,000 possible codes! We won't run out any time soon!
Check out some bar codes, and see if you can identify the numbers. OK, so decoding these bars isn't super-exciting, and it can make your eyes hurt! But at least now you know more about them!
No comments:
Post a Comment