|
The calculation method of Mod 43 is described in the
symbology code 39 article. We assume
that you want to find the check digit of A1207-D. Here is how it works:
Step One: Take the value of each character in the barcode,
the start/stop characters are not included. The value of each character can
be looked up from the character value table in the
Code39
specification.
Step Two: Sum all values of each character described in step one. (11+1+2+0+7+37+14)=72
Step Three: Divide the result of step two by 43.
72 mod 43 = 29
Step Four: Reverse look up the Code39 character value table and
get the corresponding character S. S is our check character.
The check character calculation method is described in the article
Symbology Code11. We assume that you
want to find the check digits of string 12-13048569. Here is how it
works:
Step One: Start with the right-most digit in the message; assign
the weight starting with 1. Move from the right to left, and increment the
weight by one. A dash has a value of 10.
|
Index |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
|
Digit |
1 |
2 |
- |
1 |
3 |
0 |
4 |
8 |
5 |
6 |
9 |
|
weight |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
Step Two: Multiply the character value by weight and add the
results together. (11*1+10*2+9*10+8*1+7*3+6*0+5*4+4*8+3*5+2*6+1*9)=238
Step Three: Divide the total result by 11. The remainder becomes
the "C" check digit. 238 mod 11 = 7
Step Four: Since the encoded string has a length of 11
which is greater than 10, we need to calculate "K" check digit as well.
Rearrange the table with C check digit on the farthest right:
|
Index |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
|
Digit |
1 |
2 |
- |
1 |
3 |
0 |
4 |
8 |
5 |
6 |
9 |
7 |
|
weight |
12 |
11 |
10 |
9 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
Step Five: Repeat the step two to step four. Multiply the
character value by the weight and add results all together we
get 294. Divide the result by 11 we get the remainder 8. The "K" check
digit is 8.
The check character calculation method is described in the article
Code128 Specification. We assume that you
want to find the check digits of string MRV9012. Here is how it
works:
Step One: Start with the first character in the message, assign
weight starting with 1. The start character also has a weight of 1. since
the actual encoding is (START-A)(M)(R)(V)(CODE-C)(90)(12), we have
total 7 characters in the message. Move from the left to right, and
increment the weight by one. The value of each character can be found
here.
|
Index |
N/A |
1 |
2 |
3 |
4 |
5 |
6 |
|
character |
START-A |
M |
R |
V |
CODE-C |
90 |
12 |
|
value |
103 |
45 |
50 |
54 |
99 |
90 |
12 |
|
weight |
1 |
1 |
2 |
3 |
4 |
5 |
6 |
Step Two: Multiply the character value by weight and add the
results together. (103*1+45*1+50*2+54*3+99*4+90*5+12*6)=1328
Step Three: Divide the total result by 103; get the remainder:
1328 mod 103 = 92
Step Four: Reverse look up the
Code128 encoding table;
since the second part is encoded in character C, we should look up on the
character C set. The result is character (92).
|