Barcode Xpress for Java v13.9 - Updated
Checksums
Supported Barcode Types > Checksums

Checksums are used to detect errors in the transmission of data. The idea is that the whole unit of data can be identified by a single number, a checksum. If the checksum does not match its expected value, errors have occurred.

Many types of barcodes employ checksums. In several other types, checksums are optional. Those that incorporate checksums are more robust and reliable.

Checksum Example

The simplest checksum is to add up the value of the individual bytes in the data. Given the data of "CAT", the ASCII values of the letters are as follows:

We would sum these values and receive 215. Since 215 does not equal 216, we know that an error has occurred.

This simple sum of the characters can be fooled by switching the order but not the value of the data, e.g. "TAC" and "CAT" have the same checksum. So more sophisticated checksum methods have been developed which reduce (but never totally eliminate) the chance of incorrect data giving the correct checksum.

Error Correction

In the example above, we can detect that "CAS(216)" has a data transmission error, but we can't correct it becausee we don't know which character caused the problem. "BAS(216)" or "CAT(216)" could be the correct data.

To be able to correct data transmission errors, Reed-Solomon Error Correction is performed. More often, advanced barcodes use this system. There is a trade-off here however, because as the barcode is made more robust against transmission errors, the barcode has to store more ECC data in its data.

Platform-Specific Notes

The UPC and EAN codes always append the checksum character to the barcode results. This is done regardless of the AppendCheckSum property value.

The UPC and EAN codes always append the checksum character to the barcode results. This is done regardless of the AppendCheckSum property value.

The UPC and EAN barcodes always append the checksum character to the barcode results regardless of the BarcodeAppendCheckSum property value.

The UPC and EAN codes always append the checksum character to the barcode results. This is done regardless of the AppendCheckSum property value.

The UPC and EAN codes always append the checksum character to the barcode results. This is done regardless of the AppendCheckSumproperty value.

The UPC and EAN codes always append the checksum character to the barcode results.

Checksums by Barcode Type

Barcodes with No Checksum Barcodes Requiring a Checksum Barcodes with Optional Checksum Barcodes with Error Correction
Add 2 Code 128 Code 39 Australia Post 4 State
Add 5 Code 93 Code 39 Extended Aztec
Codabar Code 93 Extended Industry 2 of 5 Data Matrix
Code 32 IATA 2 of 5 Interleaved 2 of 5 MicroPDF417
DataLogic 2 of 5 EAN-128 Inverted 2 of 5 PDF417
Patch Code EAN-13 BCD Matrix QR Code
EAN-8 UPU S18 4-State
GS1 DataBar
Intelligent Mail
Matrix 2 of 5
Planet
PostNet
Royal Post 4-State
UPC-A
UPC-E


For more information, see the Barcode Xpress SDK product page or try our online demos.

Is this page helpful?
Yes No
Thanks for your feedback.