UNB ECE4253 Digital Communications
Department of Electrical and Computer Engineering - University of New Brunswick, Fredericton, NB, Canada

UPC-A Barcode Generating Tool

This online tool generates a 1-dimensional barcode symbol (UPC-A) representing 11 input digits.


Encoding Result

The supplied 11-digit sequence 31415926535 is encoded below in a 12-digit UPC-A barcode. The 12 numbers shown printed along the bottom are a human-readable form of the barcode content, where the two end digits are found printed outside the barcode. The final digit (8) is an overall check digit as described below. Encoding
Enter Eleven Digits:
Discussion | View Bits

Check Digit Calculation

The final digit (8) is appended for error detection to complete the 12-digit symbol. The check digit is calculated such that the weighted sum as shown is a multiple of 10 for a valid UPC-A symbol.

314159265358 
×3 ×1 ×3 ×1 ×3 ×1 ×3 ×1 ×3 ×1 ×3 ×1  
-- -- -- -- -- -- -- -- -- -- -- -- 
 9 +  1 + 12 +  1 + 15 +  9 +  6 +  6 + 15 +  3 + 15 +  8 = 100 ≡ 0 mod 10

Any wrong digit and many other digit errors will be detected if the check calculation does not give a zero result. The identical algorithm is used to compute the ISBN-13 check digit.

2024-03-04 14:39:23 AST
Last Updated: 2016-05-01
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...