Worthdata Inc B78 ユーザーズマニュアル

ページ / 53
47
UPC-E Checksum Calculation 
Use the sample data of 123456 to demonstrate the UPC-E checksum 
calculation: 
 
1.  The 6 digit UPC-E code is converted to a 10-digit code, using an 
expansion scheme based on the sixth digit: 
 
If the code 
ends in: 
UPC-E Data 
Insertion Digits 
Insertion 
Position 
10 digit code 
abcde0 
00000 
Ab00000cde 
abcde1 
10000 
Ab10000cde 
abcde2 
20000 
Ab20000cde 
abcde3 
00000 
Abc00000de 
abcde4 
00000 
Abcd00000
abcde5 
0000 
Abcde0000
abcde6 
0000 
Abcde0000
abcde7 
0000 
Abcde0000
abcde8 
0000 
Abcde0000
abcde9 
0000 
Abcde0000
 
Because the sample UPC-E code ends in a 6, the insertion digits 0000 are 
inserted at the sixth digit (insertion position 6): 
 
1234500006 
 
2. Add 
the 
Number System Character of 0 to the sample data: 
 
01234500006 
 
3.  Use the UPC-A check digit calculation described in the previous 
section to produce a check digit as if it were a UPC-A code.  The 
check digit for the sample data is: 
 
 
4.  The complete 8 digit code consists of the Number System Character
the original 6 digit code and the check digit
 
01234565