YouHaveBO.com

Everything you never 
wanted to know about barcodes

Extrapolated Barcode Specs

Compiled by Nick Johnson.

Code 16k

Code 16k is interesting because it's essentially a lot of reverse-video code128 rows stacked on top of one another, with some bearer bars, start/stop characters, a start symbol, padding, and check symbols thrown in.

Code 16k has 6 modes:
ModeStarting
Code Set
Starting
Shift Mode
0Anone
1Bnone
2Cnone
3BFNC1
4CFNC1
5C1SB
6C2SB

FNC1, or "function 1" means that the data following is to be interpreted as a UPC would be. 1SB and 2SB are "single-shift B" and "double shift B" meaning that the next or next 2 characters are from character set B, respectively. FNCs and Shifts are also defined in the character set.

A Code 16k block may contain up to 16 rows, separated by horizontal bearer bars. The top and bottom of the symbol have longer bearer bars to include a leading and trailing quiet zone. Each row has its own start and stop character and contains 5 symbols. PAD characters must be inserted to make a row contain 5 symbols if necessary. Here are the start and stop patterns:
ROWSTARTSTOP
13 -2 1 -1 1-3 2 -1 1
22 -2 2 -1 1-2 2 -2 1
32 -1 2 -2 1-2 1 -2 2
41 -4 1 -1 1-1 4 -1 1
51 -1 3 -2 1-1 1 -3 2
61 -2 3 -1 1-1 2 -3 1
71 -1 1 -4 1-1 1 -1 4
83 -1 1 -2 1-3 1 -1 2
93 -2 1 -1 1-1 1 -3 2
102 -2 2 -1 1-1 2 -3 1
11 2 -1 2 -2 1-1 1 -1 4
121 -4 1 -1 1-3 1 -1 2
131 -1 3 -2 1-3 2 -1 1
14 1 -2 3 -1 1-2 2 -2 1
151 -1 1 -4 1-2 1 -2 2
163 -1 1 -2 1-1 4 -1 1

Symbols may be concatenated by making FNC2 the first character following the starting symbol. Each subsequent pattern is appended to the preceding pattern. It is also possible to concatenate in a random order by making the value of the first symbol following the start symbol equal to 10 times the symbol number plus the total number of symbols (not to exceed 9). For example, the 4th block out of 8 would encode to 48. In this case, the next symbol should be FNC2 (ie, [ 48, FNC2 ]).

The start symbol is calculated to be 7 times the number of rows-2, plus the mode. [ 7(r-2)+m ]. Modes are defined in the table above.

Here is the table of characters and their patterns:
ABCVALUEBAR/Space Values
  000-2 1 -2 2 -2 2
!!011-2 2 -2 1 -2 2
""022-2 2 -2 2 -2 1
##033-1 2 -1 2 -2 3
$$044-1 2 -1 3 -2 2
%%055-1 3 -1 2 -2 2
&&066-1 2 -2 2 -1 3
''077-1 2 -2 3 -1 2
((088-1 3 -2 2 -1 2
))099-2 2 -1 2 -1 3
**1010-2 2 -1 3 -1 2
++1111-2 3 -1 2 -1 2
,,1212-1 1 -2 2 -3 2
--1313-1 2 -2 1 -3 2
..1414-1 2 -2 2 -3 1
//1515-1 1 -3 2 -2 2
001616-1 2 -3 1 -2 2
111717-1 2 -3 2 -2 1
221818-2 2 -3 2 -1 1
331919-2 2 -1 1 -3 2
442020-2 2 -1 2 -3 1
552121-2 1 -3 2 -1 2
662222-2 2 -3 1 -1 2
772323-3 1 -2 1 -3 1
882424-3 1 -1 2 -2 2
992525-3 2 -1 1 -2 2
::2626-3 2 -1 2 -2 1
;;2727-3 1 -2 2 -1 2
<<2828-3 2 -2 1 -1 2
==2929-3 2 -2 2 -1 1
>>3030-2 1 -2 1 -2 3
??3131-2 1 -2 3 -2 1
@@3232-2 3 -2 1 -2 1
AA3333-1 1 -1 3 -2 3
BB3434-1 3 -1 1 -2 3
CC3535-1 3 -1 3 -2 1
DD3636-1 1 -2 3 -1 3
EE3737-1 3 -2 1 -1 3
FF3838-1 3 -2 3 -1 1
GG3939-2 1 -1 3 -1 3
HH4040-2 3 -1 1 -1 3
II4141-2 3 -1 3 -1 1
JJ4242-1 1 -2 1 -3 3
KK4343-1 1 -2 3 -3 1
LL4444-1 3 -2 1 -3 1
MM4545-1 1 -3 1 -2 3
NN4646-1 1 -3 3 -2 1
OO4747-1 3 -3 1 -2 1
PP4848-3 1 -3 1 -2 1
QQ4949-2 1 -1 3 -3 1
RR5050-2 3 -1 1 -3 1
SS5151-2 1 -3 1 -1 3
TT5252-2 1 -3 3 -1 1
UU5353-2 1 -3 1 -3 1
VV5454-3 1 -1 1 -2 3
WW5555-3 1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C4CODEB100-1 1 -4 1 -3 1
FNC4CODEACODEA101-3 1 -1 1 -4 1
FNC1FNC1FNC1102-4 1 -1 1 -3 1
PADPADPAD103-2 1 -1 4 -1 2
2SB2SA1SA104-2 1 -1 2 -1 4
2SC2SC2SB105-2 1 -1 2 -3 2
3SC3SC3SB106-2 3 -3 3

To read either of the pattern tables here, consider positive numbers to be a bar width and negative numbers to be a space width.

There are 2 checksums at the end of the code, which are calculated by weighting the sum of the values of each character including the start character. The first check symbol starts the weighting at 2, and the second starts weighting at 1. Next, take the modulo 107 of the sum. So if you had the character values 22, 10, 15, 20, the two checksums would be:
(2*22 + 3*10 + 4*15 + 5*20) % 107
(1*22 + 2*10 + 3*15 + 4*20) % 107

You can make a code16k barcode here. Only mode 1 is supported.



Codabar
Codabar
Code 2 of 5
Code 2 of 5
Code 3 of 9
Code 3 of 9
Interleaved 2 of 5
Interleaved 2 of 5
Postnet
Postnet
UPC
UPC
Code 128
Code 128
Code 16k
Code 16k





Vi Powered Lynx Now! Powered by FreeBSD
Thu Jul 24 11:01:09 PDT 2008   barcode/code16k.src
Updated: Thu Aug 18 2005 9:31.35   Viewed: never

Copyright © 1998-1999 by Nick Johnson. All rights reserved.