What is Barcode?

Barcode is used in grocery industry which has large number of items normally "checked-out" at the grocery store. Beside that it avoid cashier error in payment because each product has their own barcode and it identified the information such as price, kinds, etc.

When did barcode used?

Barcode was born in USA, in 1973. When it first time used, to the average person, the it looks confusing and complex, but when it related to the computer in it’s application, it's actually very simple. It just needs to identify the presented number to thescanner which is connected to computer, so computer will display the information of product.

Kinds of Barcode

  • short barcodes
  • tall barcodes
  • skinny barcodes
  • fat barcodes
  • postal barcodes
  • international barcodes
  • How computer scanner identify barcode

Barcode consist of seven unit, each unit identify with two colour, black and white. A unit that is black would display as a "bar". A unit that is white would display as a "space".A single barcode number is actually seven units. A unit is either black or white. A unit. Another way of writing a barcode unit is "1" for a single unit "black bar" and "0" for a single unit "white space". For instance, the number "1" is composed of the seven units, "0011001" or "space-space-bar-bar-space-space-bar".

Also, on a UPC barcode the same numbers on the left-hand side (the Manufacturer Code) is coded different than the numbers on the right-hand side (Product Code). The left side numbers are actually the "inverted" or "mirrored" codes of the right side numbers, for instance what is a "bar" on the right-side, is a "space" on the left-side. The right-side codes are called "even parity" codes because there is an even number of "black bar" units. For instance the right-side "6" is "101000" - 2 even-numbered "black bar" units. The left-side is called "odd-parity" because there is an odd number of "black bar" units. For instance, the left-side "6" is "0101111" - 5 odd-numbered "black bar" units. Having different coded numbers for each side allows the barcode to be scanned in either direction.

Anatomy of Barcode

Note: The computer does not read the numbers underneath the barcode. These Human Readable (HR) numbers are printed so a "human" can easily read the barcode, if necessary.

Number System Character: This number is a UPC system number that characterizes specific types of barcodes. In a UPC barcode it is normally on the left of the barcode. The actual "barcode" (the "bars" and "spaces") is the first "barcode" after the first "guard bar". The Number System Character is the blue box on the "Anatomy of a Barcode".

Codes of the Number System Character:

  • 0 - Standard UPC number.
  • 1 - Reserved.
  • 2 - Random weight items like fruits, vegetables, and meats, etc.
  • 3 - Pharmaceuticals
  • 4 - In-store code for retailers.
  • 5 - Coupons
  • 6 - Standard UPC number.
  • 7 - Standard UPC number.
  • 8 - Reserved.
  • 9 - Reserved.

3 Guard Bars: There are "3 guard bars". They are located at the beginning, middle and end. The beginning and ending guard bars are encoded as a "bar-space-bar" or 101. The middle guard bar is encoded as "space-bar-space-bar-space" or 01010. The guard bars "tell" the computer-scanner when the manufacturer and product code begin and end. For example, when the computer-scanner reads the first "101" or guard bar, the computer knows the next series of numbers is either the manufacturer or product code. And when the computer reads the "01010" or middle guard bar, the computer knows another number is coming. The 3 guard bars are also the supposedly "666" hidden in the barcode (we'll look at this in detail later). The 3 guard bars are highlighted with a green box on the "Anatomy of a Barcode".

Also, the first guard bar scanned is used by the computer to calculate the "width" of one unit.

Manufacturer Code: This is a five digit number specifically assigned to the manufacturer of the product. The manufacturer codes are maintained and assigned by the Uniform Code Council (UCC). Every product the manufacturer makes, carries the same manufacturer code. For example, the manufacturer code for Kellogg's is 38000. Every product Kellogg makes carries 38000 as the manufacturer code in the bar code. The manufacturer code is yellow on the "Anatomy of a Barcode".

Product Code: The product code is a five digit number that the manufacturer assigns for a particular product. Every different product and every different packaging or size, gets a unique product code. For instance, a 16oz bottle of coke gets a different product code than a 24 oz bottle of coke. For example: Kellogg's 13.5 oz Rice Krispies barcode is 38000 90530 — the 38000 is the manufacturer code for Kellogg and the 90530 is the product code for 13.5oz Rice Krispies. Kellogg's 16oz Mini-Wheats is 38000 02720 — the 38000 is the manufacturer code for Kellogg (the manufacturer never changes for Kellogg products) and the 02720 is the product code for 16oz Mini-Wheats. A manufacturer can have 99,999 unique product codes. The product code is orange on the "Anatomy of a Barcode".

Check digit: Also called the "self-check" digit. The check digit is on the outside right of the bar code. The check digit is an "old-programmer's trick" to validate the other digits (number system character, manufacturer code, and product code) were read correctly. The check digit is red on the "Anatomy of a Barcode".

How the computer calulates the check digit:

  1. Add all the odd digits. In our "Anatomy of a Barcode" we would add 0 (yes, you include the number system character digit) + 2 + 4 + 6 + 8 + 0 = 20
  2. Multiply the sum of step 1 by 3. Our example would be 20 x 3 = 60.
  3. Add all the even numbers. In our "Anatomy of a Barcode" we would add 1 + 3 + 5 + 7 + 9 = 25. You do not include the 5 or the check digit because that's what you are calculating.
  4. Now add the result from step 2 and step 3. 60 + 25 = 85.
  5. The check digit is the number needed to add to step 4 to equal a multiple of 10. 85 + 5 = 90. 5 is the check digit in our example. Another way to calculate the check digit would be simply to divide the number from step 4 by 10. The remainder is the check digit. Example 85/10 = 8.5

taken from:terry watkins, What about barcodes and 666: The Mark of the Beast?