Ever wondered why plants glow after rain? Why rainbows are actually bow shaped? What gives the butterfly its colours or why the stars twinkle? The little moments of 'eureka' that happen in a person's life, changes his perception of things happening around him and leaves him with a desire to explore further. Through this blog we will take you on a journey of thousands of light years into space, explore the invisible world of angstroms, play with atoms and listen to the story that numbers tell.

All narrated in your mother tongue .

हिन्दी मे ... தமிழில்

Saturday, May 8, 2010

Decode the bar code

Ever wondered what differentiates a can of diet coke from a jar of peanut butter? If yes then welcome to the club. For answer, one has to look into the ubiquitous black and white stripes on these products, the barcode.

History of barcode dates back to about six decades, when it was invented by Bernard Silver in 1948. (Twenty five years gone by, before it was first used to read a price on a juicy fruit gum on June 26th 1974).Today it act as both a mundane fingerprint of modern life and a cultural icon of retail shops across the world.

Anatomy of a Bar Code is composed of a series of parallel black and white lines. When a scanner's laser beam hits the bar code, the black modules absorb the light, while the white modules reflect light. A photo diode in the scanner decodes the reflected light into an electrical signal, which is amplified and translated into digital code by the scanner's microprocessor (Fig1). That code is then fed into the store's main computer, which finds the price.



Fig 1

Different bar-code languages are used to identify different types of products, like groceries, clothing and electronics. Although many bar-code languages have been developed by the retail and manufacturing industries since they were first adopted in the early 1970's.The most widely used type is the Universal Product Code (U.P.C), found in most groceries and retail stores.
The U.P.C. is a 12-digit code: the first digit identifies the general category of the product; the next five, the product's manufacturer; the next five, the individual item (like Coke, Diet Coke or Caffeine Free Coke), and finally a ''check digit'' that is used to make sure that the code is scanned correctly in the right orientation.

A typical U.P.C., read from left to right (Fig 2), starts with a quiet zone Next comes the left guard pattern, which alerts the scanner and computer system that information is coming. The next modules identify the number of the product category. That number is printed at the lower left margin of the U.P.C. manufacturer. The next five digits identify the manufacturer. Centre guard pattern divides the left and right halves of the bar code. The next five digits on the right side identify the particular product -- e.g., whether it is a 12-ounce jar of Brand X crispy peanut butter or an 8-ounce jar of a smooth one. The check digit (the last digit on the right) is used to make sure that a U.P.C. has been scanned correctly. The computer does the following calculations; if it comes out with the check digit, the scanning was correct. For a U.P.C. that starts with 0 12345 67890: Add the digits in odd positions: 0 + 2 + 4 + 6 + 8 + 0 = 20 Multiply the results by 3: 20 X 3 = 60 Add the digits in even positions: 1 + 3 + 5 + 7 + 9 = 25 Add the last two results: 60 + 25 = 85 Subtracting that answer from the next-highest multiple of 10 should produce the Check Digit: 90 - 85 = 5.




Fig 2

Next time, when u go to a supermarket figure out what these lines implies. Now you know what it means!

1 comment: