OpenWorldLab
Row: 0 Active: 0
Elementary (1D) rules One-dimensional rule, 2 states, 3-cell neighbourhood; additive

Rule 90

Add the two neighbours, take the remainder mod 2 — and get a fractal

Each cell is simply its two neighbours added modulo 2. From one starting cell it draws an exact Sierpiński triangle.

How it works

In plain English, before the notation

This rule ignores the cell itself entirely. It looks at the two neighbours on the row above and outputs 1 if exactly one of them is 1. That is addition modulo 2. From a single starting cell it draws a Sierpiński triangle exactly — not an approximation, the actual fractal — and it does so because the same arithmetic that generates the rule also generates Pascal’s triangle.

Look at the left and right neighbours on the row above, and ignore the cell directly above.
If exactly one of them is 1, the result is 1.
If both are 0, or both are 1, the result is 0.
That is the exclusive-or of the two neighbours, which is the same as adding them modulo 2.

Draw a Sierpiński triangle

  1. Open Presets and load "Rule 90 Sierpiński Triangle", or press 1-Seed.
  2. Press Play. The nested triangles are exact — every level of the pattern has the same structure as the whole.
  3. Press 3-Seed to start from three cells instead. The three triangles overlap by exclusive-or, so where two overlap you get a hole.

Starting configurations

Loads straight into the simulator

Try any rule

The catalogue covers a few dozen rules. Here you can run any of the 262,144 two-state grid rules, or any of the 256 one-dimensional rules, including ones nobody has written up.

The number is the eight-entry lookup table below, read as a binary number.

Rule

Lookup table (01011010) — neighbourhood above, result below

111
0
110
1
101
0
100
1
011
1
010
0
001
1
000
0
Rule 90 Class 3

Classification: Class 3 — chaotic, with no detected long-range order

How it runs: the automaton is a single row. Each cell reads the three cells above it and looks up the answer in 01011010. The canvas is the history — each row is one step later than the one above it.

Well-known rules

Where it came from

Rule 90 is the standard example of an additive cellular automaton, and its connection to Pascal’s triangle predates the cellular automaton framing: colouring the odd entries of Pascal’s triangle produces the Sierpiński pattern, a fact known long before 1983. Wolfram’s numbering just gave it a name in this setting.

The rule, precisely

What each cell looks at

The two neighbours on the previous row: (x−1, x+1). The centre is ignored.

What a cell can be

Two states per cell on a single row

The update

x(t+1) = (x(t, left) + x(t, right)) mod 2 = x(t, left) XOR x(t, right)

Rule 90 is 01011010 in binary. Because the operation is addition, the rule is linear: running it on the sum of two patterns gives the sum of the two results.

Linearity, and what it buys you

Almost everything interesting about this rule follows from the fact that it is addition:

  • From a single cell it produces the Sierpiński triangle, whose fractal dimension is log₂3 ≈ 1.585.
  • Patterns superpose: the result for A plus B is the exclusive-or of the result for A and the result for B. Nothing interferes non-linearly.
  • Row t of the pattern is exactly row t of Pascal’s triangle with the even numbers set to 0.
  • Because it is linear, the state at any time can be computed directly rather than by stepping — unusual among these rules.

Linear, and therefore limited

Linearity is what makes Rule 90 analysable and also what rules out universality: everything it can do is predictable in closed form.

Rule 90 is closely related to linear feedback shift registers, which are used in error-detecting codes and stream ciphers for precisely this combination of cheapness and predictability.

Where the same arithmetic turns up

Fractal geometryError-detecting codesLinear feedback shift registers

Addition modulo 2 over a line of bits is the operation behind CRC checksums and LFSR-based sequence generators. Rule 90 is that operation drawn out in space and time, which is why the same triangular patterns appear in unrelated corners of engineering.

Things to try

  • Press 3-Seed and look at where two triangles overlap. Exclusive-or means overlap cancels, so you get a hole rather than a brighter region.
  • Use the Seed Row tool to draw an arbitrary pattern on the top row and see the superposition principle directly.
  • Compare with Rule 150, which is the same idea but includes the centre cell in the sum.

Frequently Asked Questions

Colour the odd numbers in Pascal’s triangle black and the even ones white, and you get exactly the space-time diagram of Rule 90 started from a single cell. Both are computing binomial coefficients modulo 2.

References

Other rules in this family

Browse by family

Lab overview →