Link Search Menu Expand Document

Code 128

Code 128 Barcode forms part of the 1D barcode category and is denser than even Code 39, offering more capacity for encoding data. It can code a possibility of 108 symbols, with three black bars and three white spaces composing each symbol. Code 128 structure is composed of seven parts: two quiet zones (one at each end of the barcode), a start and a stop symbol, the encoded data, a check symbol, and a final bar. Each part has a specific purpose and is required to generate a complete Code 128. Code 128 has three code sets called code set A (128A), code set B (128B), and code set C (128C). There are certain data code points that allow the scanners to determine which code set must be used and when to switch between them. Code set A has ASCII characters 00 to 95, A-Z, control codes, special characters, and FNC 1-4. Code set B contains ASCII characters 32 to 127, including lowercase a-z, special characters, and FNC 1-4. Code set C has 00-99 and FNC1. The specialty of code set C is to encode two digits with a single code point.

Code 128 history

This type of 1D barcode was designed by Computer Identics in 1981 to be a better and denser version of Code 39. The name originates from the code’s ability to encode all the 128 ASCII characters. Its main purpose is encoding large data in a relatively small, dense label without the need of creating a larger barcode as was the case for Code 39. It retains the advantages of a one-dimensional barcode with added security. Code 128 grew widely in use thanks to this important fact.

Usage of Code 128

Code 128 is usually used in conjuncture with Code 39 to offer the best of both worlds to a certain industry. A mix and match of different barcodes can result in the most adequate choice depending on an industry’s needs and purposes. Code 128 EAN barcodes are commonly seen in packaging and wholesale companies. The shipping industry has also taken a particular liking to Code 128.

Pros and Cons of Code 128

Code 128 only requires six elements for each encoded character and can include all the ASCII characters, plus special characters to boot while retaining its compact format. Another advantage is the extra security it offers thanks to a check digit, making it more error-proof. One drawback emerges when it is time to print because of the use of four distinct widths variation for each encoded character, making the use of a sensible printer necessary. Not all scanners will work with this type of barcode; a more advanced equipment is also required when reading Code 128. Damage to the existing label can occur easily and may distort the encoded data. A Code 128 barcode generator needs to be purchased and a person trained in the proper use of the code sets and programming before being able to implement the system.

More on the Stop Symbol

As stated earlier, Code 128 has two stop symbols within its structure. These two symbols overlay on each other and are represented by four bars. The function of the stop symbol is to allow for both ways of scanning the barcode. When a user scans the barcode from the left towards the right, the stop sign is immediately seen. Likewise, when a user scans the barcode from the opposite direction (right side), the stop sign is instantly detected. However, while reading from the right direction, the scanner reads the stop symbol first. Reading the two stop bars at the end informs the scanner that the operation is being performed in reverse. Therefore, the scanner automatically skips the stop symbol and reads the remaining part of Code 128 in reverse mode.

Representation of Data

For many, the name code 128 will lead them to believe that this barcode encodes 128 code characters. Rather, it represents the entire 128 ASCII points in a special way. Code 128 uses A, B, and C as code sets, which are used one after the other. Within these code sets, only code A and B are used to represent the 128 ASCII values. The last code set (code C), is used for the effective encryption of digit strings.

For each starting subset, the first step involves the selection of a suitable start symbol. For each of the three code sets (A, B, and C), a portion of 103 data values is kept to facilitate the process of shifting to any of the two data sets.

Other useful articles:

Back to top

© , — All Rights Reserved - Terms of Use - Privacy Policy