A 2 x 2 regions code :
In this image, we can remark than CW nr. 2, 5 and 6 have a regular shape. CW nr. 1, 3, 4 are truncated and the remain of these CW is reported on the other side of the symbol.
You can remark on this image that the bit 8 of each CW is under the 45 degree parallel diagonal lines. Corner and border conditions are very intricate and different for each
matrix size, fortunately Datamatrix standard give us an algorithm in order to make the placement.
The 253-state algorithm.
Let P the number of data CWs from the beginning of datas, R a pseudo random number and CW the required pad CW.Example, sequence to encode with C40 method : Ab
The 3 characters are : 14, 02, 02Example in C40 :
Character Ë (203) : 203 - 128 = 75 which is "K", line 24 of the basic set. Sequence : 1 30 24Example, sequence to encode with EDIFACT method : ABC!
The 4 EDIFACT character values are : 1, 2, 3, 33The "255-state" algorithm
Let P the number of data CWs from the beginning of datas, R a pseudo random number, V the base 256 CW value and CW the required CW.
Arithmetic operations in a Galois body of characteristic 2.
The sum and the difference are the same function : the exclusive OR function.