The check character for the
UPC/EAN codes is generated by the following method:
- Designate the rightmost character odd.
- Sum all of the characters in the odd positions and multiply
the result by three.
- Sum all of the characters in the even positions
- Add the odd and even totals from steps two and three.
- Determine the smallest number that when added to the result
from step four, will result in a multiple of 10. This is the check character.
Number system character = 0
Message characters = 0123456789
Position = OEOEOEOEOEO
Sum of odd positions = 0 + 1 + 3 + 5 + 7 + 9 = 25
Odd positions X 3 = 25 x 3 = 75
Sum of even positions = 0 + 2 + 4 + 6 + 8 = 20
Sum of even and odd = 75 + 20 = 95
Check character = 5
Tag to be encoded = 001234567895
Flag characters = 20
Message characters = 0123456789
Position = EOEOEOEOEOEO
Sum of odd positions = 0 + 1 + 3 + 5 + 7 + 9 = 25
Odd positions X 3 = 25 x 3 = 75
Sum of even positions = 2 + 0 + 2 + 4 + 6 + 8 = 22
Sum of even and odd = 75 + 22 = 97
Check character = 3
Tag to be encoded = 2001234567893
Flag characters = 20
Message characters = 12345
Position = OEOEOEO
Sum of odd positions = 2 + 1 + 3 + 5 = 11
Odd positions x 3 = 11 \(mu 3 = 33
Sum of even positions = 0 + 2 + 4 = 6
Sum of even and odd = 33 + 6 = 39
Check character = 1
Tag to be encoded = 20123451
|