Data - Coding systems

Bar coding - Check characters

csbarcu1.gif (1809 bytes)

[NZPN-13 sample]

The check character for the UPC/EAN codes is generated by the following method:
  1. Designate the rightmost character odd.
  2. Sum all of the characters in the odd positions and multiply the result by three.
  3. Sum all of the characters in the even positions
  4. Add the odd and even totals from steps two and three.
  5. 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.

UPC A Example

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

EAN 13

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

EAN 8

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

b_wlink.gif (190 bytes)Hewlett-Packard
[Rev 27/02/99] 19/5/97 © 1997-99 V/2-Com (Verhaart), P O Box 8415, Havelock North, New Zealand.