Linear Barcode UPC-A Barcode Introdution with Checksum

Information about UPC-A and UPC-A barcode generation in .NET winforms, ASP.NET, C# and VB.NET
Generate, Create and Print UPC-A Images in .NET Applications
Terrek.com provides comprehensive UPC-A barcode generator components for developers who needs to integrate UPC-A barcode into .NET applications using various generation methods.
UPC-A Barcode Symbology Overview
Definition of UPC-A
UPC-A, with Universal Product Code A as its full name, was developed in 1973 mainly for the USA. It is by far the most common bar code type in North America, especially in the United States.
Application of UPC-A
  • Retail industries
Barcode Specification of UPC-A
  • GS1 General Specifications (Issue 2, May-2008)
UPC-A Barcode Features Overview
  • It can encode numeric character from 0 to 9. It's self-checking with one mandatory Check Digit.
  • It's a continuous and omni-directionally decodable bar code symbology, with a fixed length of 12 characters, including Check Digit.
  • Per symbol character contains two bars and two spaces, hence 4 elements, and each element is 1, 2, 3 or 4 modules in width. There are 7 modules in each symbol character.
  • Non-data characters, which include two normal Guard Bar Patterns and a centre Guard Bar Pattern are 18 modules.
  • UPC-A has two implement forms UPC-A+2 and UPC-A+5. In UPC-A+2, two digits should be added on the UPC-A symbol, using to indicate magazines and newspaper issue numbers, while in UPC-A+5, 5 digits will be added to the UPC-A symbol, using to mark suggested retail price of books.
UPC-A Barcode Structure Overview
UPC-A is composed of, from left to right: a leading Quiet Zone, a normal Guard Bar Pattern, six symbol characters from number sets A and B, a centre Guard Bar Pattern, six symbol characters from number set C, a normal Guard Bar Pattern and a trailing Quiet Zone.
UPC-A Barcode Dimension Overview
Barcode Width of UPC-A
The dimensions of UPC-A should obey the following aspects: a) the size of X-dimension is nominal 0.33 millimeter (0.013 inch). b) using the module width of each bar and space (1,2,3 or 4) multiply the X-dimension, you can get the width of each bar and space, except characters 1, 2, 7 and 8, for which the bars and spaces are reduced or enlarged by one-thirteenth of a module to increase scanning reliability. c) it is 7X for the minimum width of Quiet Zone. d) the symbol length, including the minimum Quiet Zones, should be 113 modules.
Barcode Height of UPC-A
The approximate height of the symbol, including the human readable information, is nominally 25.9 millimeters (1.0 inch), conforming to GS1 standards.
UPC-A Check Digit Calculation Example
To encode an UPC-A symbol, the software should correctly calculate the checksum digit which will be included in the barcode. The calculation is based on MOD 10, and following are steps for calculating the check digit:
  • View the right-most digit of the symbol as in an "odd" position, and assign odd and even alternately to each character moving from right to left.
  • Add up the digits in all odd positions, and multiply the result by 3.
  • Sum the digits in all even positions.
  • Plus together the totals calculated in steps 2 and 3.
  • The check digit is the number which, when added to the result calculated in step 4, getting a number evenly divisible by 10.
  • If the sum calculated in step 4 is evenly divisible by 10, the check digit is "0" (not 10).
This will be easily understood if we performance an example of calculating the check digit of “20120717553”.
  • 3 is in the odd position, 5 in even, the following 5 in odd, 7 in even … reduce like this, and the first 2 from the left is odd
  • (3+5+1+0+1+2)*3=36
  • 5+7+7+2+0=21
  • 36+21=57
  • The following number of 57 which can be evenly divisible by 10 is 60, and 60 minus 57 is 3, so our check digit is "3", and then we can get the final information as “20120717553”