7265 Programmer’s Manual 58
Copyright © 2004 TallyGenicom Chapter 3 ANSI Bar Codes
Calculating the Checksum for Code 3 of 9
A 3 of 9 symbol is a variable-length string which can inc lude the digits 0 - 9, uppercase A - Z, and
six additional punctuation characters. The values used t o compute the checksum for a 3 of 9
symbol are the locations of individual characters in the u nique 3 of 9 character table. Your
program will need to refer to a 3 of 9 look-up table to acquir e values for the characters you want
to encode, and again to convert the computed checksum back to a valid 3 of 9 character.
The check digit is the modulus 43 sum of all the charac ter values in a given symbol.
1. Compute the check character for the character s tring:
12345ABCDE/
2. Sum the values of the characters based on the ir locations in the 3 of 9 character table:
1 + 2 + 3 + 4 + 5 + 10 + 11 + 12 + 13 + 14 + 40 = 115
3. Compute the modulus 43 of the sum:
115/43 = 2 Remainder 29
4. The check character is the character corres ponding to location 29 in the 3 of 9 character
table, which is T. Send to the printer:
12345ABCDE/T

Code 3 of 9 Character Table

0 0 12 C 24 O 36 - (minus sign)
1 1 13 D 25 P 37 . (period)
2 2 14 E 26 Q 38 (space)
3 3 15 F 27 R 39 $
4 4 16 G 28 S 40 /
5 5 17 H 29 T 41 +
6 6 18 I 30 U 42 %
77 19 J 31 V
88 20 K 32W
99 21 L 33 X
10 A 22 M 34 Y
11 B 23 N 35 Z
Calculating the Checksum for CODE 93
A Code 93 symbol consists of a start code, a variable num ber of data characters, two check digits
(referred to as "C" and "K"), and a stop code.
The values used to compute the checksum for a Code 93 s ymbol are the locations of individual
characters in the Code 93 character table. Check digit "C " is the modulo 47 sum of the character
values and a weighting sequence, where the weights f rom right to left are in the sequence 1, 2,
3...19, 20, 1, 2, 3...19, 20....
Check digit "K" is the modulo 47 sum of the character values and a weighting sequence, where
the weights from right to left, starting with the check char acter "C", are in the sequence
1, 2, 3...14, 15, 1, 2, 3...14,15....