How Barcodes Work
Barcodes work in much the same way that Morse Code Works. Instead us using dots and dashes to create unique patterns that represent letters or numbers, wide and narrow bars and spaces are used. Hence the name “bar” code.
For example, in International Morse Code, the number “3” is represented by …– (three DOTS and two DASHES). One barcode symbology (Interleaved 2 of 5) encodes the number three (3) in five (5) bars or spaces as shown below.
(The number “3” is encoded in 5 elements, 2 wide elements and 3 narrow elements)
Changing the position of the wide elements creates different patterns which can represent different numbers. For example, the number “8” is still encoded in 5 elements but the wide ones are placed in different positions as shown below:
As you can see, the barcode is nothing more than a machine readable code representing any kind of data that your information system uses. Just as Morse Code can encode any message, Barcodes have the capability to encode virtually any string of numbers or text. Barcode can encode a company’s part numbers, purchase order numbers, etc.
There are many different types of Barcodes. Each uses a series of varying width bars and spaces to encode numbers and/or letters and/or special characters. Some barcode symbologies were designed to encode only numbers while others can encode numbers. letters and even special computer control characters.
Number of Bars and Symbology Character Set Spaces per Character
U.P.C. Numbers Only 2 bars, 2 spaces
Interleaved 2 of 5 Numbers Only 5 bars or 5 spaces
Code 39 Numbers and Letters 5 bars, 4 spaces
Code 128 Numbers and Letters 3 bars, 3 spaces
and special characters
Different barcode symbologies are to barcode as typefaces are to human readable text. Changing the typeface does not change the content of the message. Today’s barcode readers can easily be configured to automatically read different symbologies in the same way a person can automatically distinguish between HELVETICA and COURIER typefaces.
The Universal Product Code
The Universal Product Code (U.P.C.) is a 12 digit all-numeric code that identifies the company/product combination. The code uses a six-digit number to uniquely identify each company coupled with a five-digit number to identify each of the company’s products. The combination of these eleven digits plus a check character form the 12-digit U.P.C. number which uniquely identifies one and only one item.
Apply for your Universal Product Code Identification Number by calling 1-800-543-8137.
You will be assigned your unique six (6) digit company identification number for use on all of your products. A full set of technical specifications and guidelines will be provided with your number. Although the Council does not provide either camera-ready artwork or film masters, we can provide you with these.
Assign Item Numbers
You should assign a five (5) digit number to each of your products. You must assign different numbers for every product. The number assigned to each product must be unique to allow for store inventory and pricing purposes. For example, different numbers would be given to chocolate chip cookies in the 12 oz. and 32 oz. package or to the same brand of blue jeans in size 8 and 10. When numbers are assigned, make sure that your U.P.C. coordinator carefully records them and communicates them to your trading partners. Duplication can create chaos for you and your retailers!
U.P.C. Code & Symbol
Member System UCC Assigned Manufacturer Assigned Modulus 10
Character Manufacturer ID Item Code Check Character
The barcode example at left is “U.P.C. symbology”. There are various other barcode symbologies that differ only slightly to the human eye.
UPC Item Check Digit Calculation
The last digit in a UPC number is a calculated check digit. In the symbol below, the check digit is the number “5” at the far right of the human readable text at the bottom of the barcode. The check digit catches common data entry errors and barcode decoder errors BEFORE reaching the host system. It is calculated as follows:
Step 1 Starting from the left, add the digits in the ODD positions. The “0” is in the 1st position, the “2” is in the 3rd position, etc. (0+2+4+6+8+0 = 20).
Step 2 Multiply the result obtained in Step 1 by 3. (20 x 3 = 60).
Step 3 Add the digits in the even positions. (1+3+5+7+9 =25).
Step 4 Add the result obtained in Step 3 to the result of Step 2. (25 +60 = 85).
Step 5 Determine what number needs to be added to the result of Step 4 to make it evenly divisible by 10. (85 + 5 = 90 which is evenly divisible by 10). The Check Digit is 5.
Pre-written barcode printing software almost universally calculates the number automatically. When given an eleven digit number, the software calculates the check digit. If you need to calculate the check digit yourself, use this formula:
Code 39 is a variable length, discrete, self-checking, bidirectional, alphanumeric symbology. Its character set contains 43 meaningful characters:
0-9, A-Z, -, ., $,/,+,%, and space
Certain two character combinations can be used to print any ASCII characters. Each character is composed of nine elements: five bars and four spaces. Three of the nine elements are wide (binary value 1), and six elements are narrow (binary value 0). An additional common character (*) is used for both start and stop delimiters.
The quiet zone is an area that is clear and free of all printing preceding the Start Character and following the Stop Character. The minimum Quite Zone dimensions is ten times (10x) the nominal narrow element (X).
Wide To Narrow Ratio
The ratio of dimensions between wide elements (bars or spaces) and the narrow elements (bars of spaces) is referred to as the wide to narrow ratio.
The dimensions of the narrow bars and narrow spaces is called the X dimension. All dimensions must be equal in a symbol. The dimension of the wide bars and spaces is a multiple of X. The ratio is preselected and must be maintained throughout the printed symbol.
Code 39 has been adapted with specialized standards for specific industries.
Interleaved 2 of 5 Code
Each symbol uses a series of characters which are represented by the wide and narrow elements. These wide or narrow elements can be represented by either a bar or a space. The wide elements are equal to a binary value of (1), while the narrow elements are equal to a binary value of zero (0). Each character has a unique binary representation and element pattern.
Each data character is represented by five bars or five spaces. Each bar or space position has a value or weight. These values are 1,2,4,7 and parity. The parity position is used to maintain an even count of two wide elements for each character.
Code 128 (USD-6) is a barcode symbol whose name defines its capability of encoding the full ASCII 128 character set. CODE 128 is evolutionary in its ability to encode all the characters currently encodable in the various code formats existing today. The symbol is also revolutionary in its ability to encode those characters using fewer code elements per character resulting in a more compact code. It features unique start and stop characters for bidirectional and variable length decoding, both bar and space character parity for character integrity, a check character for symbol integrity, a function character for symbol linking, and spare function characters for unique application definition and/or future expansion.