Time to decode the Barcode!
Let's start from something which you would be already knowing. All Barcodes look similar - atleast when viewed from distance. They have the same alternating black and white lines (always). Plus there is one more similarity - there are exactly 95 lines of those.
So let's build on from here. There are 95 columns evenly spaced. Some columns appear thicker when a group of columns are of same color, both black and white. See the top of the figure below
Next, when the laser light falls on these set of parallel lines, the white lines reflect most of the light while black lines don't. Now computers can understand only two numbers either zero or one. So it treats no light lines as ones and all light lines as zero - ya it is a bit less intuitive, but it is.
Time to go into more detail now.
(image source - Wikipedia )
The first line reflects none of the light (or very less light) - Hence assigned the digit 1. The next line reflects almost all light - hence assigned 0. In the same manner all columns are assigned the numbers. Total assignations - 95. Note these numbers are different from the one actually put below. After this, these 95 numbers are grouped in 15 different sections. 12 of these sections are used for the actual visible numbers and rest 3 acts as guards - Left Guard, center guard and right guard. You can see that in each bar code the left, right and the center are similar.
The patterns for the left side code are shown below -
The pattern for the right side is similar except that it has even number of 1s. This helps the computer to figure out which side is left/right, in case the product has been turned upside down! There is one more check for this. All the codes for the left side begin with a 0 while for the right side they begin with 1, leaving the guards.
Each of the above 6 vacant spaces on either side represents the numbers you see on the bar code.
Okay now we have got the numbers, what do they mean actually?
1. The very first number decides the type of product - Standard, weighted items, pharmacy, coupons etc.
2. The next 5 set of numbers tells who the manufacturer of the product is.
3. The next 5 set of numbers tells the product code.
4. Finally the final digit, is called Modulo check character. It is used for error checking. It is an important number and functioning is explained below.
To get the Modulo check character
Add all the digits at odd places. There are 11 digits (leaving the Modulo number)
So for the above figure it is
0+6+0+2+1+5 = 14 : Multiply it by 3 to get 42
Now add the even digits: 3 +0+0+9+4 = 16
Add both: 42 + 16 = 58.
Now the modulo check number is got by subtracting this from the next higher multiple of 10. Here 60 - 58 = 2 --> The Modulo number.
This is how the scanner verifies whether the code is correct or not.
Now does barcodes have information on price?
Yes, but not directly. After scanning the barcodes, the scanner sends
the code to a central computer and from there it fetches up the price. By this the price of the product can be changed accordingly at the central Point of Sale computer.
Some interesting facts.
The bar codes were originated from the Morse code. By extending the dots and dashes vertically.
Before putting it on the packets, at one point of time, Barcodes were put inside the packet! After that it was found to be much easier to print it on it.
The first scanning of bar code took on Wrigleys' chewing gum.
There are over a hundred of different bar code types invented, however, only a half-dozen are used regularly.
Raj Arjit
Let's start from something which you would be already knowing. All Barcodes look similar - atleast when viewed from distance. They have the same alternating black and white lines (always). Plus there is one more similarity - there are exactly 95 lines of those.
So let's build on from here. There are 95 columns evenly spaced. Some columns appear thicker when a group of columns are of same color, both black and white. See the top of the figure below
Next, when the laser light falls on these set of parallel lines, the white lines reflect most of the light while black lines don't. Now computers can understand only two numbers either zero or one. So it treats no light lines as ones and all light lines as zero - ya it is a bit less intuitive, but it is.
Time to go into more detail now.
(image source - Wikipedia )
The first line reflects none of the light (or very less light) - Hence assigned the digit 1. The next line reflects almost all light - hence assigned 0. In the same manner all columns are assigned the numbers. Total assignations - 95. Note these numbers are different from the one actually put below. After this, these 95 numbers are grouped in 15 different sections. 12 of these sections are used for the actual visible numbers and rest 3 acts as guards - Left Guard, center guard and right guard. You can see that in each bar code the left, right and the center are similar.
The patterns for the left side code are shown below -
The pattern for the right side is similar except that it has even number of 1s. This helps the computer to figure out which side is left/right, in case the product has been turned upside down! There is one more check for this. All the codes for the left side begin with a 0 while for the right side they begin with 1, leaving the guards.
Each of the above 6 vacant spaces on either side represents the numbers you see on the bar code.
Okay now we have got the numbers, what do they mean actually?
1. The very first number decides the type of product - Standard, weighted items, pharmacy, coupons etc.
2. The next 5 set of numbers tells who the manufacturer of the product is.
3. The next 5 set of numbers tells the product code.
4. Finally the final digit, is called Modulo check character. It is used for error checking. It is an important number and functioning is explained below.
To get the Modulo check character
Add all the digits at odd places. There are 11 digits (leaving the Modulo number)
So for the above figure it is
0+6+0+2+1+5 = 14 : Multiply it by 3 to get 42
Now add the even digits: 3 +0+0+9+4 = 16
Add both: 42 + 16 = 58.
Now the modulo check number is got by subtracting this from the next higher multiple of 10. Here 60 - 58 = 2 --> The Modulo number.
This is how the scanner verifies whether the code is correct or not.
Now does barcodes have information on price?
Yes, but not directly. After scanning the barcodes, the scanner sends
the code to a central computer and from there it fetches up the price. By this the price of the product can be changed accordingly at the central Point of Sale computer.
Some interesting facts.
The bar codes were originated from the Morse code. By extending the dots and dashes vertically.
Before putting it on the packets, at one point of time, Barcodes were put inside the packet! After that it was found to be much easier to print it on it.
The first scanning of bar code took on Wrigleys' chewing gum.
There are over a hundred of different bar code types invented, however, only a half-dozen are used regularly.
Raj Arjit
0 comments:
Post a Comment