 Message Forum

Symbology
Specifications

News

Barcode Printers

Services

Legal Info

## CODE 93 SYMBOLOGY

Quick Link:   Background    Check Digit    Encoding    Structure    Encoding Table    Example    Full ASCII Mode

#### CODE 93 BACKGROUND INFORMATION

Code 93 was designed to complement and improve upon
Code 39. Code 93 is similar in that it, like Code 39, can represent the full ASCII character set by using combinations of 2 characters. It differs in that Code 93 is a continuous symbology and produces denser code. It also encodes 47 characters compared to Code 39's 43 characters.

A typical Code 93 bar code is: Code 93 is a continous, variable-length symbology.

#### COMPUTING THE CHECKSUM DIGIT

Code 93 always includes two check characters which are referred to as "C" and "K". These two check characters immediately follow the encoded message itself and immediately precede the final stop character.

The "C" checksum character is the modulo 47 remainder of the sum of the weighted value of the data characters. The weighting value starts at "1" for the right-most data character, 2 for the second to last, 3 for the third-to-last, and so on up to 20. After 20, the sequence wraps around back to 1. In the above example (TEST93), the "C" checksum would be calculated as follows:

 DATA T E S T 9 3 VALUE 29 14 28 29 9 3 WEIGHT 6 5 4 3 2 1 WEIGHTED SUM 174 70 112 87 18 3

Thus the sum of the individual weighted sums is 174 + 70 + 112 + 87 + 18 + 3 = 464. Modulo 47 gives a value of 9 with remainder 41. The value 41 is associated with the plus (+) sign, so the "C" check character would be encoded using the plus symbol encodation from the table below.

The "K" checksum character is calculated in basically the same way except that the weighting goes from 1 to 15. Also, the right-most character is now the "C" checksum character which was calculated in the step above.

 DATA T E S T 9 3 + VALUE 29 14 28 29 9 3 41 WEIGHT 7 6 5 4 3 2 1 WEIGHTED SUM 203 84 140 116 27 6 41

Thus the sum of the individual weighted sums is 203 + 84 + 140 + 116 + 27 + 6 + 41 = 617. Modulo 47 gives us a value of 13 with a remainder of 6. The value 6 is associated with the ASCII character "6", so the "K" check character would be encoded using the "6" symbol encodation from the table below.

#### ENCODING THE SYMBOL

Once the checksum digit has been calculated we know the entire message which must be encoded in the bars and spaces. Continuing with our example, we will encode, from zero, the Code 93 bar code we used in our example above: HI345678 with a checksum digit of 67.

In the following text, we will discuss the encoding of the bar code by considering that the number "1" represents a "dark" or "bar" section of the bar code whereas a "0" represents a "light" or "space" section of the bar code. Thus the numbers 1101 represents a double-wide bar (11), followed by a single-wide space (0), followed by a single-wide bar (1). This would be printed in the bar code as: #### STRUCTURE OF A CODE 93 BARCODE

A Code 93 bar code has the following structure:

1. A start character , represented below by the asterisk (*) character.
2. Any number of characters encoded from the table below.
3. The "C" and "K" checksum digits calculated as described above and encoded using the table below.
4. A stop character, which is a second asterisk character.

#### CODE 93 ENCODING TABLE

 VALUE CHARACTER ENCODING VALUE CHARACTER ENCODING 0 0 100010100 24 O 100101100 1 1 101001000 25 P 100010110 2 2 101000100 26 Q 110110100 3 3 101000010 27 R 110110010 4 4 100101000 28 S 110101100 5 5 100100100 29 T 110100110 6 6 100100010 30 U 110010110 7 7 101010000 31 V 110011010 8 8 100010010 32 W 101101100 9 9 100001010 33 X 101100110 10 A 110101000 34 Y 100110110 11 B 110100100 35 Z 100111010 12 C 110100010 36 - 100101110 13 D 110010100 37 . 111010100 14 E 110010010 38 SPACE 111010010 15 F 110001010 39 \$ 111001010 16 G 101101000 40 / 101101110 17 H 101100100 41 + 101110110 18 I 101100010 42 % 110101110 19 J 100110100 43 (\$) 100100110 20 K 100011010 44 (%) 111011010 21 L 101011000 45 (/) 111010110 22 M 101001100 46 (+) 100110010 23 N 101000110 - * Start/Stop 101011110

Note that the characters (\$), (%), (/), and (+) are special characters that are used to encode all 128 ASCII characters using Code 93's Full ASCII mode.

In Code 39, four of the characters (\$, %, /, and +) are used to optionally encode all 128 characters-but there is no way to know whether those characters are being used as shift characters in Full ASCII mode or whether they are being used to represent \$, %, /, and +. In Code 93 this problem is solved by reserving these four special characters exclusively to "shift" into Full ASCII mode.

#### CODE 93 ENCODING EXAMPLE

We will now code the example we used above, TEST93, plus the two checksum digits we calculated above.

1. The START character (*): 101011110.
2. The digit "T": enocded as 110100110.
3. The digit "E": enocded as 110010010.
4. The digit "S": enocded as 110101100.
5. The digit "T": enocded as 110100110.
6. The digit "9": enocded as 100001010.
7. The digit "3": enocded as 101000010.
8. The "C" check digit "+": enocded as 101110110.
9. The "K" check digit "6": enocded as 100100010.
10. The STOP character (*): 101011110.
11. Termination Bar: 1.
This is shown in the following graphical representation where the bar code has been sectioned-off into areas that reflect each of the 10 components just mentioned. NOTE: In the above encoding example note that the last component, the termination bar (#11), follows the last character. This is because all characters, including the STOP character, end with a space-the final termination character is used to "terminate" the last character so that the width of the final space can be determined.

#### EXTENDED CODE 93 ENCODING TABLE

It is possible, using Code 93's "Full ASCII Mode" to encode all 128 ASCII characters. This is accomplished by using the (\$), (/), (%), and (+) symbols as "shift" characters. Those characters combined with the single character that follows indicate which Full ASCII character is to be used.

The Extended Code 93 Encoding Table is identical to the Extended Code 39 Encoding Table except that Code 93 uses its four specialized shift characters (\$), (/), (%), and (+) to shift to Full ASCII mode instead of Code 39 which isues the \$, /, %, and + characters.

For example, to encode a lowercase B in Code 39, the sequence "+B" is used. In Code 93 the sequence would be encoded as "(+)B" where (+) refers to one of the four special characters that Code 93 can encode that Code 39 can't.

Use the Extended Code 39 Encoding Table for Extended Code 93 encoding, and just remember to use the special characters (\$), (/), (%), and (+) whenever the Code 39 Encoding table refers to \$, /, %, and +.