On this page
Take a row of squares, each black (1) or white (0). To make the next row, each square looks at its left neighbour, itself and its right neighbour, and a fixed rule turns that pattern into a new colour. Stack the rows downwards and you have an elementary cellular automaton. You can run one with a pencil.
How does a rule number encode the table?
Three cells, each 0 or 1, make 8 neighbourhoods, from 111 down to 000; a rule says which of them produce a black cell.
There are 2^8 = 256 elementary cellular automata, each indexed by an 8-bit binary number (Wolfram MathWorld). The numbering comes from Stephen Wolfram's 1983 paper Statistical mechanics of cellular automata.
To decode any rule number:
Write the number in binary, padded to 8 digits.
Line the digits up under the neighbourhoods 111, 110, 101, 100, 011, 010, 001, 000, in that order.
Each digit is the new colour of the middle cell for that neighbourhood.
Rule 30 is 00011110 in binary, read in order from 111 through 000 (MathWorld, Rule 30). So 100, 011, 010 and 001 give a black cell, and the other four give white. Rule 90 is 01011010 (MathWorld, Rule 90). Rule 110 is 01101110: every neighbourhood gives black except 111, 100 and 000 (MathWorld, Rule 110).
What are the first rows of rule 30, worked by hand?
Start with one black cell. Each row is two cells wider than the last:
Row 0: 1
Row 1: 111
Row 2: 11001
Row 3: 1101111
Row 4: 110010001
To get row 3, pad row 2 with two white cells on each side: 001100100. Slide a window of three along it: 001, 011, 110, 100, 001, 010, 100. The rule 30 table turns these into 1, 1, 0, 1, 1, 1, 1, which is row 3.
Now try row 5 from row 4. You should get 11011110111; if not, check you read the table from 111 downwards.
Why does rule 30 look random?
Within a few rows rule 30 turns irregular. MathWorld describes rule 30 as chaotic and lists its centre column as 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1 (MathWorld, Rule 30). Your rows above give the first five: 1, 1, 0, 1, 1.
Wolfram studied this column as a source of random-looking bits in Random sequence generation by cellular automata (Advances in Applied Mathematics, 1986). Rule 30 was used for integer random number generation in Mathematica before version 6.0, and in 2019 Wolfram announced prizes for questions about rule 30 (MathWorld, Rule 30). But it is deterministic: the same first row always gives the same pattern.
How does rule 90 draw the Sierpiński triangle?
From one black cell, rule 90 gives:
Row 0: 1
Row 1: 101
Row 2: 10001
Row 3: 1010101
Row 4: 100000001
In Pascal's triangle mod 2, each interior entry is also the XOR of the two entries above it, and colouring its odd entries produces a Sierpiński sieve (MathWorld, Rule 90). Row 3 of Pascal's triangle, 1 3 3 1, is 1 1 1 1 mod 2: the same four 1s rule 90 gives, with white cells between. Lucas's theorem on binomial coefficients mod p tells you which entries are odd, and box-counting fractal dimension measures how the triangle fills space.
Why is rule 110 Turing complete?
From one black cell, rule 110 grows only to the left:
Row 0: 1
Row 1: 11
Row 2: 111
Row 3: 1101
Row 4: 11111
Row 5: 110001
Matthew Cook's paper Universality in Elementary Cellular Automata (Complex Systems, 2004) proves a conjecture Wolfram made in 1985: that rule 110 is capable of universal computation. MathWorld adds that this needs suitably encoded initial conditions and repeating backgrounds (MathWorld, Rule 110). So a carefully prepared, repeating starting row lets rule 110 simulate, in principle, any Turing machine.
It also inherits a computer's limits: no general method can decide what a universal system will eventually do, for the reason Turing gave in why the halting problem is undecidable.
A 20-minute practice plan
Decode rule 250 (11111010) and check that it means left OR right.
Extend rule 30 to row 8 on squared paper and check your centre column against MathWorld's list.
Draw rule 90 to row 7 beside Pascal's triangle mod 2.
Run rule 110 to row 8 and explain from its table why it never grows right.
If binary, XOR or Pascal's triangle is the step that stalls you, the Fermi Concept Library has every concept in mathematics and computing, each with its own lesson and its place in the map. Not sure where to begin? Fermi's AI tutor can work out what you already know and build a plan for the session.
Pick a rule number between 0 and 255, decode it, and draw ten rows before you look up what it does.



