Now a days every item that we purchase contains price in Bar codes. Staring from Groceries, Clothes, House holds everything is mentioned in Bar codes. Have you ever tried to understand this? How to read this code and how it will be used? Here I would like to explain about this.
These bar codes are called UPC ( Universal Product code) bar code. These bar codes are helpful to track inventory as well as to avoid human to remember the price of the item. These codes initially used in North America and other developed countries. Later it has spread across the world. Firstly these bar codes developed by UCC ( Universal code council).
Have a look at below sample bar code to understand more.
This bar code comprise of two parts, one is called The machine readable bar code and 2nd one is human readable numbers. The black lines in bar code are readable by bar code machine. In above bar code first 6 digits represent manufacture code. So, 016000 stands for manufacturer code and next 5 digits stands for item code. In above image 66060 represent item code. And the last digit called check digit. This is used to ensure that scanned bar code is valid or not.
How this can be determined? Lets me explain this.
First add all odd digits in the bar code. In the image 0+6+0+6+0+0 = 12
Multiply number by 3 now. i.e. 12*3 = 36.
Now all all digits in even position. i.e. 1+0+0+6+6=13
Now add this value to number derived in step 2. i.e. 13+36=49
Now to get check digit, add a least possible number to 49 to make it multiple of 10. i.e. 1
You get 50 which is multiple of 50. So check digit is 1.
If this check digit calculated wrong then scanner cannot read it, and required to be rescanned or enter price manually.
All ok now, but how price of the item will be determined? This is actually not included in bar code. Every Time scanner read the bar code it retrieve the price of the item from store central point of Sale. Means it will be stored on central repository and can be changed by whenever store owner want to change.
Some of the bar codes contain only 8 digits by surpassing all 0. These bar codes are called Zero suppressed bar codes.
The first digit of bar code is called number system character. Following illustration give what different number system character mean.
0- Standard UPC number (Must have 0 for zero suppressed bar codes)
1- Reserved character.
2- For random weight items like, veg, fruits, wheat etc..
3- Used for Pharmaceutical products.
4- Individual store owners use them. Only recognized by particular store scanner.
5- used for git coupons.
6,7 - Standard UPC number
8,9- Reserved
Now, let us see how to decode bar codes to numbers? As you see bar code its made up black bars and white spaces. The thinnest bar or space is called one unit wide black bar or space. The thickness of bar or space is proportional width of 1,2,3,4. Means the thickest bar called 4 unit wide black bar or space bar, like wise units are used to determine width of the bar. Every bar code starts with 1-1-1. That is 1 unit black bar followed by 1 unit space and followed by 1 unit black bar again. Every digit in bar represented by combination 2 black bars and 2 spaces.
Lets consider below image to understand the bar code numbers.
The bar code digit is 016000660601 Having said already every bar code start with 1-1-1 means 1unit wide bar,space and bar. Let us see bar code digit representation now by leaving this 1-1-1 notation.
After first 2 black bars you can see 3 unit wide space followed by 2 unit wide bar, followed by 1 unit space and finally 1 unit black bar. So 0 is formed by 3-2-1-1 ( 3 unit wide space, 2 unit wide bar,1 space and 1 bar). Like wise
0 - 3,2,1,1
1 - 2,2,2,1
6 - 1,1,14
0 - 3,2,1,1
0 - 3,2,1,1
0 - 3,2,1,1
6 - 1,1,14
6 - 1,1,14
0 - 3,2,1,1
6 - 1,1,14
0 - 3,2,1,1
And finally bar,space,bar to represent check digit and end of bar code.