Monday, March 26, 2007

Thirty seven

Today I learned about how UPC bar codes work. Basically, the first half of the number indicates the manufacturer and is assigned by the UPC overlords, while the second half of the number indicates the specific product and is assigned by the manufacturer, who also has to keep track and make sure that they never use the same number twice, etc. The final digit is a "check number" that you can figure out by like adding and multiplying all the other numbers in a certain way (see the link for details); the computer does this calculation and compares with the check number to make sure the item got scanned correctly. Cool, huh?

As for the bar code itself, each number is represented by a combination of four black lines and white spaces of varying thickness (from one to four units wide). The link will give you the specifics if you feel like impressing the opposite sex by decoding bar codes for them.

I guess that's pretty much it, even though this was not actually what I set out to learn today. I just wanted to know how scanners actually read bar codes, and not necessarily about UPC codes specifically; like, the ones we use at the library, for example. How does that red light read those little lines? Keep your eyes peeled for an exciting follow-up, loyal reader(s).

No comments: