Barcode Technology Online  
Barcode Introduction


CODE 128 SYMBOLOGY


CODE 128 INTRODUCTION

Code 128 is a alphanumeric symbology. Code 128 symbology must include a checksum digit.Code 128 has three character Set: A,B,C.Three different start characters tell the reader the character set used in the following encoding, and three shift codes permits changing character set inside the symbol. From the table below, we can see that character set A and B is used to encode alpha-numeric information while character set C offers double density when being used to encode numeric data. The special character Shift, changes the character set of the immediately followed character. The shift work only with Code A or Code B characters. Four FNC characters are listed, FNC2 is used to tell barcode reader to store the data and transmit with next symbol; FNC1, FNC3 and FNC4 are reserved for future applications.Encoding Table as follow:

VALUE
CHARACTER SET
 
VALUE

CHARACTER SET
A
B
C
A
B
C
00
SP
SP
00
 
53
U
U
53
01
!
!
01
 
54
V
V
54
02
"
"
02
 
55
W
W
55
03
#
#
03
 
56
X
X
56
04
$
$
04
 
57
Y
Y
57
05
%
%
05
 
58
Z
Z
58
06
&
&
06
 
59
[
[
59
07
'
'
07
 
60
\
\
60
08
(
(
08
 
61
]
]
61
09
)
)
09
 
62
^
^
62
10
*
*
10
 
63
_
_
63
11
+
+
11
 
64
NUL
`
64
12
,
,
12
 
65
SOH
a
65
13
-
-
13
 
66
STX
b
66
14
.
.
14
 
67
ETX
c
67
15
/
/
15
 
68
EOT
d
68
16
0
0
16
 
69
ENQ
e
69
17
1
1
17
 
70
ACK
f
70
18
2
2
18
 
71
BEL
g
71
19
3
3
19
 
72
BS
h
72
20
4
4
20
 
73
HT
I
73
21
5
5
21
 
74
LF
j
74
22
6
6
22
 
75
VT
k
75
23
7
7
23
 
76
FF
l
76
24
8
8
24
 
77
CR
m
77
25
9
9
25
 
78
SO
n
78
26
:
:
26
 
79
SI
o
79
27
;
;
27
 
80
DLE
p
80
28
<
<
28
 
81
DC1
q
81
29
=
=
29
 
82
DC2
r
82
30
>
>
30
 
83
DC3
s
83
31
?
?
31
 
84
DC4
t
84
32
@
@
32
 
85
NAK
u
85
33
A
A
33
 
86
SYN
v
86
34
B
B
34
 
87
ETB
w
87
35
C
C
35
 
88
CAN
x
88
36
D
D
36
 
89
EM
y
89
37
E
E
37
 
90
SUB
z
90
38
F
F
38
 
91
ESC
{
91
39
G
G
39
 
92
FS
|
92
40
H
H
40
 
93
GS
}
93
41
I
I
41
 
94
RS
~
94
42
J
J
42
 
95
US
DEL
95
43
K
K
43
 
96
FNC3
FNC3
96
44
L
L
44
 
97
FNC2
FNC2
97
45
M
M
45
 
98
SHIFT
SHIFT
98
46
N
N
46
 
99
Code C
Code C
99
47
O
O
47
 
100
Code B
FNC4
Code B
48
P
P
48
 
101
FNC4
Code A
Code A
49
Q
Q
49
 
102
FNC1
FNC1
FNC1
50
R
R
50
 
103
START A
START A
START A
51
S
S
51
 
104
START B
START B
START B
52
T
T
52
 
105
START C
START C
START C
 
 
STOP
STOP
STOP

Code 128 checksum digit calculation

The CODE 128 checksum digit is the result of the weighted sum of the values of each of the digits modes 103.

The steps for calculating the check digit are as follows:

  1. Add the start character value(103, 104, or 105) to the running checksum.
  2. Take each character in the message, take its value, and multiply it by its character position, and add the total to the running checksum.
  3. The checksum digit is the result of running checksum modulo 103.
Example:to calculate the checksum digit example :"EASESOFT1234".

String
Start B
E
A
S
E
S
O
F
T
Start C
12
34
Value
104
37
33
51
37
51
47
38
52
99
12
34
Weight
1
1
2
3
4
5
6
7
8
9
10
11
Sum
104
37*11=37
33*2=66
51*3=153
37*4=148
51*5=255
47*6=282
38*7=266
52*8=416
99*9=891
12*10=120
34*11=374

  • Summing up the sum of each character,The sum is 104+37+66+153+148+255+268+266+416+891+120+374=3112.

  • 3112 divides 103, the remainder is 22,so the checksum digit is 22.  

STRUCTURE OF A CODE 128 BARCODE

A Code 128 barcode has the following physical structure:

  1. Start code, which is the code 103, 104, or 105 from the encoding table .
  2. Each of the data bytes of the message, encoded with the encoding table.
  3. The checksum byte, calculated as described above and encoded using the table.
  4. Stop character.
  5. Termination bar of 11.

UCC/EAN-128 SYMBOLOGY

UCC/EAN-128 only can encode numeric data using the Code 128 Character Set C. UCC/EAN-128 starts with character C,follow FNC1 character( 102) and other data.

 

© 2000-2006 EaseSoft Inc. All Rights Reserved.Terms of Use | Privacy Statement