next up previous
Next: 13.1.1 The totalistic code Up: 13 Rules. Previous: 13 Rules.

13.1. The rule-table.

A network or CA rule is defined by a lookup-table or rule-table. A neighbourhood of size k has 2k alternative configurations. These are set out in a lookup table matrix in reverse value order. Each neighbourhood is assigned an output (0,1), and the resulting bit string defines each of the 22K possible rules. The rules may also be expressed in decimal (for a maximum neighbourhood of 5) or in hexadecimal.

For example, the k=3 neighbourhoods are set out thus (with the neighbourhood index on the left),

7......0 - rule-table index

. .

2 - 11110000

1 - 11001100

0 - 10101010

----

11000001 - = rule 193 in decimal, c1 in hex.

The k=5 neighbourhoods are set out thus, (with the neighbourhood index on the left),

31...... ........ ........ .......0 - rule-table index

. .

4 - 11111111 11111111 00000000 00000000

3 - 11111111 00000000 11111111 00000000

2 - 11110000 11110000 11110000 11110000

1 - 11001100 11001100 11001100 11001100

0 - 10101010 10101010 10101010 10101010

---- ---- ---- ----

11111100 01100010 10001000 00110111- = rule fc 62 88 37 in hex