On Mon, Apr 11, 2005 at 10:29:39AM +0900, Phil Tomson wrote:
> >Here is the sample data in a table:
> >	- rows represent a different character (as labeled)
> >	- columns represent the position of the character
> >	  (examples represent data in decimal notation, not octal/hex)
> >		example: "aaaa" would become 000 003 002 005
> >		example: "zach" would become 027 003 000 012
> >
> >	1	2	3	4	5	6    (etc......)
> >----------------------------------------------------
   - 0   |1     2       3       4       5       6       <<<<<<< ADDED
> >a 1   |0	3	2	5	4	7
> >b 2   |3	0	1	6	7	4
> >c 3   |2	1	0	7	6	5
> >d 4   |5	6	7	0	1	2
> >e 5   |4	7	6	1	0	3
> >f 6   |7	4	5	2	3	0
> >g 7   |6	5	4	3	2	1
> >h 8   |9	10	11	12	13	14
> >i 9   |8	11	10	13	12	15
> >j 10  |11	8	9	14	15	12
> >k 11  |10	9	8	15	14	13
> >l 12  |13	14	15	8	9	10
> >m 13  |12	15	14	9	8	11
> >n 14  |15	12	13	10	11	8
> >o 15  |14	13	12	11	10	9
> >p 16  |17	18	19	20	21	22
> >q 17  |16	19	18	21	20	23
> >r 18  |19	16	17	22	23	20
> >s 19  |18	17	16	23	22	21
> >t 20  |21	22	23	16	17	18
> >u 21  |20	23	22	17	16	19
> >v 22  |23	20	21	18	19	16
> >w 23  |22	21	20	19	18	17
> >x 24  |25	26	27	28	29	30
> >y 25  |24	27	26	29	28	31
> >z 26  |27	24	25	30	31	28

I've added the missing row, which should make the pattern clearer.

The table value is just the binary XOR of the column number and the
character number.

The following Ruby program recreates the table:

(1..26).each do |char|
  printf("%2d |", char)
  (1..6).each do |col|
    printf("%4d", col ^ char)
  end
  print "\n"
end

Regards,

Brian.