How To Calculate Code 128 Check Digit? A Step-By-Step Guide
This article will give you the code 128 check digit to help you understand more about it.
This code type is popular and beneficial for you.
Thus, you should learn the related information, including how to use it and how to do code 128 barcode check digit calculator.
Scroll down for details!
Code 128 barcode check digit
Code 128 Specification
Before understanding barcode check digit calculator code 128, we need to know about the barcode first.
What is barcode? Barcodes are machine-readable representations of letters and numbers composed of bars and spaces.
One of the common barcode types is code 128.
It is also named because it can encode all 128 ASCII characters and is the symbol of choice for many barcode applications.
It is considered the most readable barcode with the highest message integrity.
Code 128 specification
Code 128 has three character sets in the table below, defined as Code Set A, Code Set B, and Code Set C.
These codes can be selected by choosing the starting character appropriately.
A special "shift" character in each code set allows it to be replaced with another during the scanning process.
Code set C provides twice the packing density of code sets A and B when the data consists only of numeric data. Each code set includes one or more characters stored for special roles and functions.
The Code 128 specification asks for a check digit for inclusion. A barcode symbol structure consists of:
Quiet zone or white space to the left of the bar
Variable number of data characters
Quiet zone or white area to the right of the bar
The quiet zone may be at least 10 times with the space element and the narrowest bar width.
Each character in the barcode symbol consists of 6 bars and 6 spaces.
The last symbol is always one space less than the bar, so the stop character has 6 bars and 5 spaces.
Each bar or space can have one of four different unit widths.
Therefore, the narrowest possible bar or space is a quarter of the width of the widest bar or space.
This table contains bar/space widths for the Code 128 character set. Note that the bar width sum for each character is even, and the sum of spaces is odd.
The first column is the value to calculate the code 128 font check digit in the table.
The Code 128 specification lets you read information printed anywhere outside the symbol.
Code 128 Character Set
Although the Code 128 character set comprises only 102 characters, this symbology supports all 128 lower-ASCII characters.
This is possible as Code 128 uses three various sets of 102 characters (Code Set A, Code Set B, and Code Set C).
The starting character determines the default code set for one of types of barcode such as Code 128.
Yet, it is possible to switch between different character sets and use a combination of them in a single symbol.
Code 128 gives the highest possible character density since you encode data. The three character sets may be summarized as follows.
Code Set A: Include all numeric characters (0-9), uppercase letters (A-Z), punctuation marks, seven special characters, and "control characters" (ASCII values 00-95).
Code 128 character set
Code Set B: Include all numbers (0-9), uppercase and lowercase letters (A-Z, a-z), punctuation, and 7 special characters (ASCII values 32-127).
Code Set C: Contain all pairs of digits from 00 to 99 and 3 special characters. Although this code set is numeric only, each character represents two digits.
Instructions On The Use Of START, CODE And SHIFT Characters
To minimize symbol length, you should follow this guide:
According to the guidelines, the Bars & Stripes Barcode Software automatically selects the correct START, CODE, and SHIFT characters.
From left to right:
(a) Use the leading character 'C' if the data begins with four or more digits;
(b) Any other case where a control character precedes a lowercase letter you can use as a font for barcode in the data will use the starting character 'A'.
(c) Otherwise, use the starting letter 'B'.
Use code ‘A’ or code ‘B’ to insert before the final digit if character ‘C’ is used and a digit odd number begins the data. You can follow guidelines 1(b) and 1(c) above to make an option between code ‘A’ and Code ‘B’.
If 4 or more digits appear together in character sets 'A' or 'B':
(a) If the number of digits in the group is even, add the code 'C' before the first digit.
(b) If the number of digits in the group is odd, insert the code 'C' immediately after the group.
Guide on using CODE, START, and SHIFT characters
If the data contains character set 'B' and control characters:
(a) when a control character is followed by a lowercase letter before another control character appears, insert a shift character before the control character.
(b) otherwise, insert the code 'A' before the control character.
If the character set shows an 'A' and a lowercase letter in the data:
(a) After a lowercase letter and before another lowercase letter, there is a control character; it is case-sensitive and adds a shift character before lowercase letters.
(b) Otherwise, insert the code 'B' in front of lowercase letters with a proper barcode font.
If the character set is 'C' and the data has non-numeric characters, insert the code 'A' or choose "B" before non-numeric characters using guidelines 1(b) and 1(c) above.
How To Calculate Code 128 Check digit?
Does code 128 have a check digit? Code 128 is self-checking and does not normally require a check digit.
However, a module 103 checksum digit can be added for applications requiring very high accuracy.
Follow our instructions on code 128 check digit calculation below:
Get each symbol character value.
Each symbol character position is weighted. The starting character position is weighted with 1. Then the other positions are weighted by 1, 2, 3, 4, ..., n from the beginning of the left side of the first symbol character.
Multiply each character by the weight of the type of barcodes string.
Sum the products of the check digit calculator for code 128 in step 3.
Next, divide the sum of the products by 103. 6. The remainder value in step 4 is the symbol check character value. Then you need to find the corresponding checksum digit according to the ASCII value.
Barcode code 128 check digit
A Code 128 barcode begins with a START character, followed by a DATA character, a CHECK character, and a STOP character.
The entire bar code symbology must also include a quiet zone with spaces both before the START character and after the STOP character.
Barcode GS1-128 (Data Carrier) was developed to provide a global standard for data exchange between different companies.
GS1-128 not only encodes data but also provides a way to define the meaning of the data by defining a list of Application Identifiers (AIs).
Yes, it does. Code 128 requires different stop characters or starts to complete the barcode’s encoded.
We’ve covered important information about code 128. Follow the ultimate guide with the ideal tips to create the best quality barcode. Besides, you should consider code 128 check digit with special characters and specifications to use and calculate it properly.