Brief Introduction of Code 128
General information include check digit, valid set and structure of Code 128
Code 128 Barcode Introduction
Code 128 is an excellent alphanumeric linear barcode symbology which was defined by ISO/IEC 15417:2007. This barcode symbology is capable to encode high density of ASCII Character Set. Code 128
is appended with one mandatory checksum digit which will not be displayed in the human readable interpretation. It is widely used in shipping and packing systems and also was utilized by Automatic Identification Manufacturers (AIM) as standard barcode symbology.
Code 128 Barcode Library for .NET Applications
Aspper.com provides robust barcode generator to create Code 128 in many .NET applications.
Detailed Information for Code 128 Barcodes
Code 128 Valid Character Set
- All 128 ISO/IEC 646 characters, i.e. characters 0 to 127 inclusive, in accordance with ISO/IEC 646
- Characters with byte values 128 to 255 may also be encoded
Code 128A, Code 128B, Code 128C
Code 128 allows easy encoding of alphanumeric data and all 128 characters of ASCII. By utilizing extended character FNC4, Code 128 is able to encode Latin-1 characters. Code 128 is divided into 3 subsets (A, B and C) and encode data below:
- Subset A of Code 128: standard ASCII symbols (0-9, A-Z and control codes), data symbols, upper case letters, and control codes
- Subset B of Code 128: standard ASCII symbols (0-9, A-Z, a-z), digits, upper case letters, and lower case letters
- Subset C of Code 128: 00-99 (encodes each two digits with one code) and FNC1
Code 128 Structure
Code 128 should comprise 6 parts according to the barcode specification ISO/IEC 15417. Each character is composed of 6 elements, 3 of which are bars and the others are spaces. The bars and spaces are arranged alternately from left to right and each of which is composed of 1, 2, 3 or 4 modules. (Note: The stop character is 13 modules since it comprises an additional bar element).
- Quiet zone
- One of the three start codes (A/B/C)
- Data symbols encoded
- Checksum digit
- Stop character
- Quiet zone
Checksum Digit of Code 128
The symbol check character of Code 128 is mandatory and shall be included as the last symbol character before the Stop character. However it should not be displayed in the human readable interpretation. To compute checksum digit for Code 128, just follow the steps:
- Calculate the numeric values of the start character.
- Calculate the numeric values of the first data followed the start character. Multiply the value with 1 (it's position value).
- Calculate and multiply the numeric values of the followed digit with it position value in sequence.
- Divided the value by 103. The remainder is the checksum digit should be appended.
- End with a stop character.