Barcode Scanner Universal Product Codes Upcs Verifies 12 Digit Code Scanned Comparing Code Q37163732

A barcode scanner for Universal Product Codes (UPCs) verifiesthe 12-digit code scanned by comparing the code’s last digit(called a check digit ) to its own computation of the check digitfrom the first 11 digits as follows: 1. Calculate the sum of thedigits in the odd-numbered positions (the first, third, …, eleventhdigits) and multiply this sum by 3.

2. Calculate the sum of the digits in the even-numberedpositions (the second, fourth, …, tenth digits) and add this to theprevious result.

3. If the last digit of the result from step 2 is 0, then 0 isthe check digit. Otherwise, subtract the last digit

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.