The MATRIX suite of codes
Julian Rose
23-27 December,
2001
This page is a tribute to my father,
Geoffrey John Rose, M.A. (Cantab), 1934-2001. It describes the MATRIX suite
of barcode designs that he developed.
Copyright Notices: This
page is Copyright (C) 2001, Julian Rose, Sussex U.K. The MATRIX design
is Copyright (C) 1985-1994, Geoffrey Rose, Sussex, U.K. Certain
MATRIX application copyrights or other commercial interests may also be
held by limited company.
Notices:
-
Anyone is free to apply the code designs
described herein, but the designs may neither be modified nor extended
without prior written permission from this
author who is acting in the capacity of copyright guardian. To put
it another way, MATRIX is copyrighted and is neither public domain nor
Open Source nor otherwise licensed.
-
Commercial
hardware is available to scan the codes (requiring PC or terminal keyboard,
or serial host interfaces, and a pen or scanner reader) and reference
software (for 32-bit MS-Windows) is available to reproduce them.
1. Overview
MATRIX is a suite of several related
barcodes providing full alphanumeric and mixed international alphabet support,
at the same time providing good space efficiency, safety and legibility.
The symbology can be auto-descriminated safely in the presence of the major
symbologies, at the same time offering a range of features which exceed
those available with existing symbologies. These include:
-
Segregation of text, decoder hardware
configuration and other domains
-
Capability of representing all alphabets
and accents in a single barcode
-
Representation of all keys on a keyboard
-
Built-in future expansion potential
1.1 General description
MATRIX is a binary 1-dimensional code
symbology, with wide & narrow modulation of both bars and gaps. The
suite comprises 10 related codes, where each member occupies a different
functional domain. The MATRIX format is quite conventional, comprising:
-
a START pattern of 3 bars and 3 gaps
-
a data pattern with bars and gaps as required
-
a CHECK pattern of 4 bars and 4 gaps
-
a STOP pattern of 3 bars and 2 gaps [a third gap is implied in trailing
whitespace]
1.1.1 Start and stop patterns
There are twelve 3-bar & 3-gap patterns used for end codes. Their formats
enable bi-directional reading. Ten of the patterns are used as START codes,
one for each of the member barcodes. One START code [MAT C, 0x12] also
serves as the forwards STOP code common to each member, which leaves the
remaining two end patterns as the reverse STOP codes. [The forwards direction
refers to input scanning left-to-right.]
1.1.2 Check pattern
The CHECK pattern is constructed using a selected algorithm which possesses
a check generator value for all data bars and gaps in any barcode. The
check generator value is different for each of the ten members of the suite
[see Appendix A1]. The check is applied
to the barcode pattern, not to the characters represented; this supports
the concept of a pattern domain distinct from the character domain.
1.1.2.1 worked checksum at read time
[Let
N be a narrow bar, value 0
W be a wide bar, value 1
n be a narrow gap, value 0
w be a wide gap, value 1]
Consider the example barcode [written notationally]:
NnWwNnWwNnNnNwNnWwWwWnNnWwN[n]
The START (3 bars, 3 gaps) is binary 010010 or 0x12, so this is MAT
C [refer to Appendix A1]. The check generator
is 0xB5 (10110101 binary), and there are 4 bars and 4 gaps per character.
a. Set out the data [underlined] and check bits [italic] in sequence
b. From the left, ignore all lead 0s and the next 1
c. EXCLUSIVE OR the next 8 bits with the check generator
d. repeat from b. until 8 bits are left. A zero result is OK.
The following division illustrates the above worked checksum example:
| 1 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
0 |
|
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
1 |
|
|
|
|
|
|
|
|
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
1 |
1 |
1 |
1 |
1 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
0 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
|
|
|
|
|
|
|
|
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
1 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
|
|
|
|
|
|
|
|
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
1 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
1 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1.1.2.2 worked checksum at print time
Consider the example when the text EEC is required as a barcode.
Character analysis defines that MAT 1 is required. The START pattern 0x09
(3 bars, 3 gaps) will be used. The character count is odd, so a leading
zero will be inserted. The check generator value is 0xE5.
a. Set out the data in character sequence. Append 8 zero bits.
b. From the left, ignore all lead 0s and the next 1
c. EXCLUSIVE OR the next 8 bits with the check generator
d. Repeat from b. above until 8 bits remain. This is the check pattern.
The following division illustrates the above worked checksum example:
| 0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
|
|
|
|
|
1 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
0 |
1 |
1 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
1 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
0 |
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
Print out the MAT 1 START pattern (0x09) as 3 bars interleaved 3 gaps,
the data as 4 bars alternately 4 gaps (0EEC), the CHECK pattern first 4
bits as bars, the last 4 bits as gaps, and lastly append the STOP pattern
(0x12) as 3 bars interleaved 3 gaps:
NnNnWwNwNwNwNnWwWwWnNnNwNnWwWnNnWwN[n]
1.2 Suite member identification
Each member is recognised by having a unique START pattern and also a unique
check generator value. These two parameters give satisfactory member identification.
The ten members are assigned the identies:
-
MAT 1-4
-
MAT C
-
MAT D
-
MAT G
-
MAT H
-
MAT J
-
MAT K
2. MATs 1 through 4
These four codes, colloquially the 'normal' codes, have functions closely
related to the popular barcode symbologies. They carry alphanumeric text
strings. The quantity of text characters in a given barcode string is,
within reason, unlimited. Each character is represented by a group of bars,
alternatively by a group of gaps. The quantity of bars & gaps used
for a character depends upon which of the four codes is in use. No data
character uses both bars and gaps, unlike the START, STOP and CHECK patterns.
For each of the normal codes the first character is represented in the
first bar pattern following the START pattern, the second character in
the first gap pattern, the third character in the second bar pattern, etc.
Thus an even quantity of characters is forced. At print time, if an odd
quantity of characters is submitted then the string has a zero (MAT 1)
or space (MATs 2-4) inserted in front. At read time, a decoder can be conditioned
to process the lead insertion character as required, using character count
controls.
The choice of which normal MAT code to use is made at print time. The
submitted character string is first reviewed and the most junior, i.e.
space-economical, code capable of representing every submitted character
is selected. The choice is totally transparent to the user who need never
be aware of the selected code unless undertaking manual analysis.
2.1 MAT 1
This uses 4-bit binary data groups to represent characters. With 16 possible
data patterns, the 16 characters which can be represented are 0 to 9 and
A to F.
2.2 MAT 2
This uses 6-bit binary data groups, giving 64 data patterns. MAT 2 represents
characters in the mid-section of the lower ASCII table from space to underscore.
The set of MAT 1 characters is a subset of those representable in MAT 2.
2.3 MAT 3
This uses 7-bit binary data groups, giving 128 patterns. MAT 3 represents
the full lower ASCII table range of characters. The set of MAT 2 characters
is a subset of those represented by MAT 3.
2.4 MAT 4
This uses 8-bit binary data groups, giving 256 data patterns. The extra
data space, beyond the capacity of the full lower ASCII table representable
in MAT 3, is used to represent a range of characters selected from the
several alternative upper tables. This includes accented Latin characters
and alternative alphabets. Eight codes are reserved for within-string controls,
of which seven have yet to be assigned functions. These controls are reserved,
so can never be confused with text. [See appendix
B.] The set of MAT 3 characters is a subset of those represented by
MAT 4.
3. Other MATRIX suite members
'Popular' barcodes, like the MATRIX 'normal' codes, carry text strings.
Clearly there is a requirement to represent other function domains, such
as decoder setup and control. Most decoder manufacturers nominate selected
text barcodes to use as control commands. This intersection of text domain
with control domain is problematic and can add user complexity. By incorporating
distinct domain representation usage can be easier, and user problems can
be reduced.
The function domains that have been identified as meaningful to represent
separately, and the corresponding MATRIX codes are:
-
Text strings, MATs 1-4
-
Decoder setup and control, MAT C
-
Single data characters, MAT D
-
Control keyboard emulation, MAT G
-
Alt keyboard emulation, MAT H
For now MATs J and K remain to be assigned. Even more members of the MATRIX
family could be added if necessary, by sub-function expansion of MAT J
and K.
3.1 MAT C
MAT C data occupies only 4 bars and the 4 interleaved gaps, so providing
256 data patterns (or 8-bit binary data groups), to represent the decoder
control domain. A decoder setup & control document can have up to 256
unique barcodes which do not intersect the text or any other domain. A
decoder manufacturer may define the use made to control their range of
decoders.
3.1.1 Pattern assignments
MAT C is used exclusively for decoder set-up and control. Each barcode
pattern represents a single 8-bit control value, i.e. decimal 0 through
255 (0x0 through 0xFF). Each value is assigned a function required in controlling
the decoder rather than in conveying text.
The 8 bits are packed into 4 bars and 4 gaps in the barcode data region.
The bars contain the most significant half [nibble] of the value (most
significant bit first [left-to-right]) and the gaps contain the least significant
half [nibble]. Each MAT C barcode therefore will always contain 14 bars
and 13 gaps, to accomodate START, data, CHECK and STOP patterns.
3.2 MAT D
MAT D data also occupies 4 bars and 4 gaps, so providing 256 unique data
patterns (or 8-bit binary data groups). These are taken to be equivalent
to the data pattern domain used in MAT 3 and MAT 4 table 0. Thus codes
can be printed which represent individual characters. The functional advantage
of creating this data domain is that MAT D is independent of any automatic
prefix & suffix & append processing or code enable & disable
controls selected for normal data strings.
3.2.1 Pattern assignments
MAT D is used exclusively for single character representation. The barcode
pattern contains an 8-bit value, i.e. decimal 0 through 255 (0x0 through
0xFF). Each value corresponds to a single character as used in MAT 4 lower
table, or upper table zero [see appendix B].
This allows for the construction of single character pages as transient
inputs, which will not undergo decoder processing selected for normal [text]
strings.
The 8 bits are packed into 4 bars and 4 gaps in the barcode data region.
the bars contain the most significant half [nibble] of the value (most
significant bit first [left-to-right]) and the gaps contain the least significant
half. Each MAT D barcode therefore will always contain 14 bars and 13 gaps,
to accomodate START, data, CHECK and STOP patterns.
3.3 MAT G
[Information on MAT G is scant, but appears to be as follows.] If MAT G
data space is limited to 4 bars and 4 gaps, then 256 unique data patterns
can be used to represent the alphanumeric control keyboard domain. If one
considers the 'regular' alphanumeric etc. keys on a keyboard, it is possible
to identify no more than 64 keys. Representing each together with either
CTRL or ALT makes a total of 128 codes; if SHIFT is also represented together
with CTRL or ALT then a further 128 codes are added to make a total of
256 codes. To put it another way, MAT G might be considered to consist
of the MAT 3 codes with either CTRL or ALT applied to represent a single
character.
3.3.1 Pattern assignments
MAT G is used exclusively for keyboard control key representation. The
barcode pattern contains an 8-bit value, i.e. 0 through 255 (0x0 through
0xFF). Each value is assigned to the alphanumeric keys with either CTRL
or ALT applied.
The 8 bits are packed into 4 bars and 4 gaps in the barcode data region.
The bars contain the most significant half [nibble] of the value (most
significant bit first [left-to-right]) and the gaps contain the least significant
half. Each MAT G barcode therefore will always contain 14 bars and 13 gaps,
to accomodate START, data, CHECK and STOP patterns.
3.4 MAT H
MAT H data space is likewise limited to 4 bars and 4 gaps, so providing
256 unique data patterns (or 8-bit binary data groups). These are used
to represent 'peripheral' keys on a keyboard - function keys, numeric pad,
non-ASCII control keys, etc. Most keyboards don't exceed a key count of
123. If one discounts the 'regular' alphanumeric etc. keys and considers
only the numeric keypad, cursor controls and function keys, it is usually
possible to identify no more than 64 extra keys. Thus the MAT H structure
can represent 64 keys, each with or without SHIFT or ALT making a total
of 256 codes.
To illustrate the potential benefit of MAT H, representation of programmable
function keys by barcode could allow the printing of a function key barcode
document. Such a document could serve in keyboard-unfriendly environments
for example.
3.4.1 Pattern assignments
MAT H is used exclusively for keyboard total key representation. The barcode
pattern contains an 8-bit value, i.e. 0 through 255 (0x0 through 0xFF).
Each value is assigned to keys on, and selected by reference to published
pages of standard keyboard layouts.
The 8 bits are packed into 4 bars and 4 gaps in the barcode data region.
The bars contain the most significant half [nibble] of the value (most
significant bit first [left-to-right]) and the gaps contain the least significant
half. Each MAT H barcode therefore will always contain 14 bars and 13 gaps,
to accomodate START, data, CHECK and STOP patterns.
[Diagrams exist to] show various keyboard layouts [122-keys, 84-keys
and 88-keys], and the assignment of values to those keys for which no ASCII
table is published. [It would be possible to produce] extra diagrams, one
for each keyboard layout that users may encounter. Apart from some dedicated
equipments and novelties, the range of keyboard layouts is reasonably limited,
largely due to the influence of major suppliers like IBM and DEC.
4. General design consideration
The MATRIX design began to be developed in the mid-1980's, resulting from
reservations about aspects of the available symbologies, also awareness
of the limitations of ASCII compared with then emerging equipment design.
As a result MATRIX offers a range of features which both exceeds what is
avaailable with existing standard symbologies and optimises usage.
4.0.1 External factors, safety and legibility
External factors are those beyond the control of the symbology design which
influence achievement of the specification. Such features include:
print quality & accuracy
print contrast, reflectivity or spectral effects
input device sensitivity and spectral response
print damage
The total effect of variations in these factors is to cause the perceived
widths or counts of bars and gaps to deviate from the specification ideal.
SAFETY may be defined as the ability correctly to reject out-of-specification
print examples. LEGIBILITY may be defined as the ability correctly to accept
in-specification print examples in the presence of eroding external influences.
A barcode design should have sufficient features to achieve adequate safety,
at the same time not so many features that it undermines user requirements
such as print space economy and legibility.
| Feature |
For |
Against |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
| Start/stop complexity |
Improves late entry/early exit detection |
Print space inefficiency |
+ |
+ |
+ |
+ |
- |
- |
+ |
- |
+ |
| Redundant data patterns |
Multiple error rejection opportunities |
Print space inefficiency |
+ |
+ |
- |
+ |
- |
- |
- |
+ |
- |
| Uniform space per character |
Multiple error rejection opportunities |
Print space inefficiency |
- |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
- |
| Check pattern |
Total data pattern validation |
Print space inefficiency |
- |
- |
+ |
+ |
+ |
+ |
+ |
- |
+ |
| Multi-width data patterns |
Alternative form of redundant patterns |
Reduced legibility tolerance. Analogue not digital approach. |
- |
- |
+ |
+ |
+ |
- |
- |
- |
- |
| Decoder character count checks |
Total pattern validation. Compensates for inadequate total pattern
features |
n/a |
/ |
/ |
/ |
/ |
/ |
/ |
/ |
/ |
/ |
The above table uses the code identities:
1. Codabar
2. Code 39
3. Code 93
4. Code 128
5. EAN or UPC or JAN
6. MSI
7. Plessey
8. 2 of 5 codes
9. Matrix
4.1 Error detection and elimination
Due to insufficient checks, some of the popular barcodes are inadequately
safe in error detection & elimination. This is particularly so where
different character counts must co-exist. The inadequacy can be demonstrated
by scanning a newspaper page using a poorly set-up decoder; spurious decodes
can be observed. The MATRIX suite was designed to include a total pattern
CHECK character which copes with several problems including mixed character
counts and some aspects of inadequate set-up. This is enhanced by incorporating
an adequate START & STOP pattern structure, which copes with late-entry
and early-exit problems.
4.2 Binary versus multi-width codes
An analysis follows of why binary codes make less demands on printing technology
than multi-width codes. This is particularly significant in multi-part
printing. MATRIX is therefore a binary symbology. Ratio 3:1 binary codes
are potentially more legible than multi-width codes. Consider should a
multi-width design, like Code 128 for example, be printed using inadequate
equipment so being out of specification; this could potentially cause customers
delay and cost, which has in fact been known to happen. A binary code would
give less problems considering the print methods used.
4.2.1 Barcode tolerances
Ideally all printed barcodes have no perceivable perturbations on the edges
between bars and gaps. The ideal is unachievable, but some print techniques
produce better edge quality than others, often at a cost. The user frequently
finds out the hard way that barcode technology is not trivial.
It is suggested that there are only four types of print error:
-
a black spot in a gap
-
a white spot in a bar
-
a black spot intersecting an edge
-
a white spot intersecting an edge
Any one printed barcode may suffer from several examples of these simultaneously.
It is useful to eveluate the effect of a single error. Cases 1 and 2 would
generate wrong counts of bars & gaps which would therefore lead to
rejection. They need no further evaluation. Cases 3 and 4 are essentially
identical. Consider an adjacent bar and gap with one wider than the other.
Consider an edge error where the wider element is reduced in width, and
the narrower element increased in width, by the error. Consider this for
both binary and multi-width barcodes.
Let:
unity be the width of the narrowest bar &
gap
&mu be the wide to narrow ratio for a
binary code
&theta be the wide element width in a
multi-width code
&phi be the narrow element width in a
multi-width code
&delta be the error width
4.2.1.1 multi-width codes
Bars and gaps are ideally 1, 2, 3 or 4 units wide. The error changes the
perceived wide element width from &theta to (&theta-&delta).
The narrow element perceived width changes from &phi to (&phi+&delta).
An error boundary arises when &delta becomes as large as 0.5,
because the element then appear to be one unity width different
from the correct values. The multi-width error to no-error boundary value
for &delta is 0.5.
4.2.1.2 binary codes
The error causes the narrow element width to change from unity to
(1+&delta). At the same time the wide element width changes
from &mu to (&mu-&delta). An error boundary condition
occurs when the wide and narrow elements become the same width, i.e. when
(1+&delta)=(&mu-&delta). It is then indeterminate which
is the wide and which is the narrow element. Thus the binary error to no-error
boundary value is when &delta=0.5(&mu-1).
4.2.1.3 conclusion
If &mu=2 then &delta=0.5, the same as for multi-width
codes. If &mu=3 then &delta=1.0. Therefore a binary
code printed with a wide to narrow ratio of 2:1 has the same error tolerance
as a multi-width code. A binary code printed with a ration of 3:1 is twice
as tolerant to errors as a multi-width code.
4.3 Print space economy
Some users have print-space limitations. MATRIX deliberately avoids the
use of redundant character patterns while remaining succesfully legible.
As a result, for numeric strings MATRIX generally provides good print-space
economy compared with other binary codes, while also enforcing use of a
check pattern. Some other binary codes don't use a check, so need to rely
on the setting of a character count or redundant patterns for safety. For
alphanumeric strings MATRIX (2:1 wide to narrow ratio) is more economic
than the 3 standard codes [Code 39, Code 93, Code 128]. Code 128 alone
gives better economy than MATRIX 3:1 but not MATRIX 2:1; Code 128 is however
multi-width, therefore is only equal to MATRIX 2:1 in legibility.
4.4 ASCII, keyboards and barcodes
The popular barcodes were built around the ASCII table. These codes were
created to represent the text string domain, and until the early-1990's
were limited to subsets of the lower ASCII table. However the table, while
mostly necessary, has fallen behind sufficiency; a glance at the keytops
on modern international keyboards illustrates this point. While it is feasible
to redeploy selected character strings to achieve extended representations,
there is a risk, rare but not unknown, of accidental mapping from one functional
domain into another.
If it can be considered the original design of the 'popular' barcodes
[for the lower ASCII text string domain] is limiting and the risks and
costs associated with customisation [into other domains] inhibit some users
and applications, then it might also be considered the expansion of barcode
application has been held back. These considerations suggest that it would
be beneficial to establish barcodes capable of carrying data beyond the
scope of the lower ASCII table, and beyond the text string domain. MATs
4, C, D, G and H are one result.
4.5 Accented characters
In 1994, MATRIX was the only code offering accented characters until the
publication of the Code 128 planned revision making use of FNC4. A comparison
of techniques is illuminating.
4.5.1 Code 128
[As of May 1994.] The proposal is for Code 128 to represent characters
beyond the lower ASCII table using FNC4. A printed barcode will optionally
use FNC4 attached to any selected lower ASCII table character to transform
it, thus representing an upper table character. The resulting upper table
character has a table & value position 128 greater than the thus-transformed
lower table character.
Unfortunately, there is more than one upper ASCII table. Different tables
are published which assign different values to a given character, also
different characters to a given table. Because the value rather than the
character is generated, the Code 128 proposed technique is unsafe to use
outside a closed application. In practice different equipments and software
use different tables, and these can need to co-exist in a large communicating
complex or international organisation.
Prior to this Code 128 proposal, any barcode string printed using this
symbology could be relied upon to represent the same characters no matter
where in the world it was sent, and in what equipment it was used. This
proposal will for the first time produce barcodes which will no longer
be portable. If such codes are transported then character conversions will
happen without warning or easy traceability, but within the design of the
symbology. It has to be suggested this Code 128 proposal is seriously flawed.
4.5.2 MAT 4
MAT 4 offers a safe method of representing upper table characters. A given
character is assigned a unique value, nothing to do with ASCII. The printed
barcode always has the same pattern for the character and the same character
for the pattern. When the code is read the character is recognised in the
decoder, which can then map it via the local host equipment look-up table
to the correct local host transmission protocol. Thus extended character
tables are universal, and barcodes containing their characters will remain
totally portable. Appendix B gives the values
already assigned to a range of characters.
4.6 MATRIX expansion
The 'popular' barcodes offer little if any expansion potential. This is
certainly not the case with the MATRIX suite, which already goes beyond
the functionality of most, if not all, other code designs, and still has
plenty of room for manoeuvre while preserving safety.
It is feasible to assign extra functions to the MAT 4 within-code controls,
also to select extra extended start codes and checksum generators, and
so provide even more expansion potential. It is reasonable to suggest that
these extensions would allow simultaneous non-intersecting representation
of Arabic, Cryllic, Greek, Hebrew, Kanji and others. [As of May 1994] such
representation is already claimed for the Code 128 development, but safety
and character table interference have been glossed over. With MAT 4 it
will be possible to identify further function domains and support them
without domain intersection.
[One aim remains to submit MATRIX to a standardisation process, so management
of it and expansion would be effected under the aegis of a controlling
body.]
Appendix A - character patterns MATs 1-4 (lower half)
A1. General
Each barcode pattern represents a series of text characters selected from
the lower ASCII table. The character string forms the data content of the
printed barcode. The data section of the barcode pattern is preceded by
a start pattern and followed by a check pattern and stop pattern. The following
table gives the control parameters for each member of the MATRIX suite.
| MATRIX identity |
START pattern |
Character bits |
CHECK generator |
Character count |
| 1 |
0x09 |
4 |
0xE5 |
unlimited i.e. string |
| 2 |
0x11 |
6 |
0xD5 |
unlimited |
| 3 |
0x0A |
7 |
0xCB |
unlimited |
| 4 |
0x16 |
8 |
0xB1 |
unlimited |
| C |
0x12 |
8 |
0xB5 |
1 i.e. singleton |
| D |
0x0C |
8 |
0xAD |
1 |
| G |
0x0E |
TBA [8] |
0xA3 |
1 |
| H |
0x0D |
8 |
0x9D |
1 |
| J |
0x13 |
TBA |
0xF3 |
TBA |
| K |
0x0B |
TBA |
0xCF |
TBA |
Ths STOP pattern is 0x12. The reverse STOP is either 0x14 or 0x15.
Each character is represented by a value which can be given in decimal,
hexadecimal or binary form. The binary format is directly converted to
the barcode printed pattern, with each binary bit represented. A binary
1 is shown as a wide and a binary 0 as narrow. As many bits are used per
character as defined for the Matrix barcode being considered, i.e. 4 bits
for MAT 1, 6 bits for MAT 2, 7 bits for MAT 3 and 8 bits for MAT 4. If
necessary, leading binary 0 bits are inserted in each character binary
pattern to make the defined quantity of bits for the barcode [i.e. padding].
Each character pattern is printed either totally in a series of bars,
alternatively totally in a series of gaps. In a string of characters:
the first character is represented in the bars pattern
following the START pattern,
the second character is represented in the gaps
pattern, interleaved with the first character bars,
the third character is in the next bars group,
the fourth character is in the gaps, interleaved
with the third character,
and so on. Thus all characters in odd positions are represented in
the bars while all even position characters are represented in the gaps.
At print time, if an odd quantity of characters is submitted, then a 0
(MAT 1) or SPACE (MATs 2, 3 and 4) is inserted at the beginning to force
an even character count, prior to identifying the even and odd character
positions.
A2. MAT 1 character patterns
The values and characters used in MAT 1 are as follows:
| ASCII character |
Barcode decimal |
Barcode hex |
Barcode binary |
Barcode pattern |
| 0 |
0 |
0x0 |
0000 |
NNNN |
| 1 |
1 |
0x1 |
0001 |
NNNW |
| 2 |
2 |
0x2 |
0010 |
NNWN |
| 3 |
3 |
0x3 |
0011 |
NNWW |
| 4 |
4 |
0x4 |
0100 |
NWNN |
| 5 |
5 |
0x5 |
0101 |
NWNW |
| 6 |
6 |
0x6 |
0110 |
NWWN |
| 7 |
7 |
0x7 |
0111 |
NWWW |
| 8 |
8 |
0x8 |
1000 |
WNNN |
| 9 |
9 |
0x9 |
1001 |
WNNW |
| A |
10 |
0xA |
1010 |
WNWN |
| B |
11 |
0xB |
1011 |
WNWW |
| C |
12 |
0xC |
1100 |
WWNN |
| D |
13 |
0xD |
1101 |
WWNW |
| E |
14 |
0xE |
1110 |
WWWN |
| F |
15 |
0xF |
1111 |
WWWW |
A3. MAT 2 character patterns
MAT 2 patterns use 6 binary bits, which provide 64 unique patterns. The
64 characters so represented are taken from the lower ASCII table, [starting]
from SPACE (32 or 0x20) to UNDERSCORE (95 or 0x5F) consecutively. The decimal
or hexadecimal or binary value used for MAT 2 representation of a character
is obtained by selecting the ASCII table value and subtracting 32 (0x20).
Because of this simple relationship, only a few characters need be illustrated
as examples:
| ASCII character |
ASCII decimal |
Barcode decimal |
Barcode hex |
Barcode binary |
Barcode pattern |
| SPACE |
32 |
0 |
0x0 |
000000 |
NNNNNN |
| & |
38 |
6 |
0x6 |
000110 |
NNNWWN |
| 0 |
48 |
16 |
0x10 |
010000 |
NWNNNN |
| A |
65 |
33 |
0x21 |
100001 |
WNNNNW |
| Z |
90 |
58 |
0x3A |
111010 |
WWWNWN |
| UNDERSCORE |
95 |
63 |
0x3F |
111111 |
WWWWWW |
A4. MAT 3 character patterns
MAT 3 patterns use 7 binary bits, so providing 128 unique patterns. The
characters represented are those in the full lower ASCII table. The decimal
or hexadecimal or binary value used for MAT 3 representation of a character
is obtained by selecting the ASCII table value. Because of this simple
relationship, only a few characters are shown here as examples:
| ASCII character |
ASCII decimal |
Barcode hexadecimal |
Barcode binary |
Barcode pattern |
| NULL |
0 |
0x0 |
0000000 |
NNNNNNN |
| & |
38 |
0x26 |
0100110 |
NWNNWWN |
| 0 |
48 |
0x30 |
0110000 |
NWWNNNN |
| A |
65 |
0x41 |
1000001 |
WNNNNNW |
| Z |
90 |
0x5A |
1011010 |
WNWWNWN |
| UNDERSCORE |
95 |
0x5F |
1011111 |
WNWWWWW |
| a |
97 |
0x61 |
1100001 |
WWNNNNW |
| z |
122 |
0x7A |
1111010 |
WWWWNWN |
| TILDE |
126 |
0x7E |
1111110 |
WWWWWWN |
A5. MAT 4 (lower half) character patterns
MAT 4 patterns use 8 binary bits, so providing 256 unique patterns. The
characters represented by the lower half exactly match those represented
by MAT 3. Only a few characters are shown here as examples:
| ASCII character |
ASCII decimal |
Barcode hexadecimal |
Barcode binary |
Barcode pattern |
| NULL |
0 |
0x0 |
00000000 |
NNNNNNNN |
| & |
38 |
0x26 |
00100110 |
NNWNNWWN |
| 0 |
48 |
0x30 |
00110000 |
NNWWNNNN |
| A |
65 |
0x41 |
01000001 |
NWNNNNNW |
| Z |
90 |
0x5A |
01011010 |
NWNWWNWN |
| UNDERSCORE |
95 |
0x5F |
01011111 |
NWNWWWWW |
| a |
97 |
0x61 |
01100001 |
NWWNNNNW |
| z |
122 |
0x7A |
01111010 |
NWWWWNWN |
| TILDE |
126 |
0x7E |
01111110 |
NWWWWWWN |
Appendix B - MAT 4 (upper half) pattern assignments
MAT 4 (upper half) uses character values in the range 128 to 255. Because
the upper tables of MAT 4 are defined only for MAT 4, any value can safely
be assigned to a text character or to an upper table control function.
B1. Within-code controls
The following 8 values (common to all upper tables) are reserved for within-code
controls, for decoder function management: 128, 144, 160, 176, 192, 208,
224 and 240.
The value 128 (0x80) has been assigned as a table change control. This
will allow for several alternative upper tables, e.g. Arabic, Cryllic,
Greek, Hebrew, Kanji and others to co-exist. It will allow for within-code
switching between tables. The switch is achieved by submitting the value
128 followed by a table identifier value i.e. a 2-byte control. Identifier
zero is assigned to the accented Latin table given below; other identifiers
are yet to be assigned. Table zero is the default table.
B2. Table zero
The following assignments have been made to MAT 4 table zero:
|
A |
E |
I |
O |
U |
Y |
a |
e |
i |
o |
u |
y |
| Acute |
129 |
130 |
131 |
132 |
133 |
134 |
193 |
194 |
195 |
196 |
197 |
198 |
| Tilde |
135 |
136 |
137 |
138 |
139 |
140 |
199 |
200 |
201 |
202 |
203 |
204 |
| Grave |
145 |
146 |
147 |
148 |
149 |
150 |
209 |
210 |
211 |
212 |
213 |
214 |
| Circumflex |
161 |
162 |
163 |
164 |
165 |
166 |
225 |
226 |
227 |
228 |
229 |
230 |
| Umlaut |
177 |
178 |
179 |
180 |
181 |
182 |
241 |
242 |
243 |
244 |
245 |
246 |
MAT 4 table zero - main accented Latin characters
A further sixteen assignments are made to represent other accented Latin
characters. [These are illustrated in the following table using lower ASCII
approximations:]
Ao |
ao |
AE |
ae |
O |
o |
C? |
c? |
N~ |
n~ |
cent |
pound |
para |
ss |
Pt |
)o( |
| 141 |
205 |
142 |
206 |
143 |
207 |
158 |
222 |
159 |
223 |
189 |
174 |
175 |
237 |
238 |
239 |
MAT 4 table zero - additional accented Latin characters
The table zero assignments, plus the 8 controls, use 84 of the 128 available
codes. Therefore 44 more assignments can be added before MAT 4 table zero
is full up. These can be assigned as users identify their barcode needs.
B3. MAT 4 expansion
Other upper tables can be defined as users identify their needs. [It has
been suggested that upper tables might be defined to support other alphabets
e.g. Arabic, Cryllic, Greek, Hebrew, Kanji. This would need careful analysis.]
[Notes
-
It might also be considered how MAT J and K can be defined usefully. Many
alphabets are identified by the unicode consortium and can be found at
http://www.unicode.org/charts/.
This would seem to fit the purpose of MATRIX. Perhaps MAT J can be defined
like MAT D to carry 16 character bits with 1 character count which would
support unicode characters or singletons. Alternatively, it might be defined
like MAT 4 to carry 16 character bits with unlimited character count which
would support unicode strings. This too needs careful consideration and
should follow unicode standardisation much like ASCII standardisation is
already followed.
-
Expansion would also require suitable decoder setup and control support
within MAT C. Perhaps MAT C may be modified, along the lines of MAT H,
where within-code functions would allow the selection of alternative upper-table
control pages. The aim is to support common settings but also allow for
different decoder private capability settings.
-
It might be prudent to leave MAT K reserved; beyond this member count unique
START patterns might become exhausted.
]
Copyright (C) 2001 Julian Rose, Sussex, U.K.
smtp.user=jhrose smtp.domain=dial.pipex.com