Productivity and Utilities

Elementary Cellular Automaton Generator

Pick a rule number and watch its pattern grow row by row.

Your pattern appears here.

What rule 90 does. Each cell looks at itself and its two neighbors. The top row shows the three cells, the bottom row shows the cell they become.

Rule table

An elementary cellular automaton is a row of cells that are each 0 or 1. The next row is made by looking at every cell with its left and right neighbors: that three-cell pattern is read as a number from 0 to 7 (left cell counts 4, middle 2, right 1), and the new cell is that bit of the rule number. Rule 90 from a single cell draws the Sierpinski triangle, the same pattern as Pascal's triangle with only odd numbers shaded. Random starting rows use a seed so the same seed always gives the same picture. Everything is drawn in your browser and nothing is uploaded.

Next step

How to use the elementary cellular automaton generator

  1. Enter a rule number from 0 to 255, or pick an example such as Rule 90 or Rule 30.
  2. Set the number of cells across and the number of generations (rows).
  3. Choose the starting row: one cell in the middle, random cells from a seed, or your own pattern of 0 and 1, and decide how the edges behave.
  4. Look at the picture and the rule table, then download it as SVG or PNG, or copy the rows as 0 and 1.

Formula

Neighborhood number = 4 x left + 2 x center + 1 x right, from 0 to 7

New cell = bit number (neighborhood number) of the rule number written in binary

Rule 90 from one cell draws Pascal's triangle with only the odd numbers shaded

Rule number = sum of 2^n over each neighborhood n that gives a 1

Each cell has two states, 0 or 1. Every generation is computed only from the one before it. The rule table at the bottom of the tool shows the eight neighborhoods and the cell each produces.

Rules 90, 30 and 110

Rule 90 from a single cell makes each cell the XOR of its two neighbors, so the first rows are 1, 101, 10001 and 1010101, forming the Sierpinski triangle. With 61 cells across and 30 generations it has 195 live cells in all and 16 in the last row. The number of live cells in row t is 2 to the power of the number of 1 bits of t, the same as the odd entries of Pascal's triangle.

Rule 30 from a single cell gives rows 1, 111, 11001, 1101111 and 110010001, an irregular pattern whose center column starts 1 1 0 1 1 1 0 0 1 1. Rule 110 grows a leaning pattern of triangles to the left. Rule 184 moves live cells one place per generation when the next place is empty, a simple model of traffic.

What an elementary automaton is

An elementary cellular automaton is a line of cells, each 0 or 1. All the cells are updated at once, each by looking at itself and its two neighbors. There are eight possible neighborhoods, each can give 0 or 1, and so there are 2^8 = 256 rules. Despite this simplicity some rules, such as 30, look random and others, such as 110, are known to be able to compute anything a computer can.

Related tools include Pascal's triangle, the binary translator, the ASCII art generator and the random number generator.

Edges, seeds and exports

At the edge of the row a cell has only one neighbor. Wrap around joins the two ends into a ring, while the empty option treats the cells beyond the edge as 0. Random starts use a seed with a small deterministic generator, so the same seed always gives the same picture. Downloads are made in your browser: the SVG draws each run of live cells as one rectangle, and the PNG is drawn on a canvas. Nothing is uploaded.

Assumptions and limits

  • The rule is a whole number from 0 to 255. The width is 5 to 301 cells and the pattern has 1 to 300 generations.
  • A custom pattern is placed in the middle of the row. It may only contain the digits 0 and 1.
  • Random starting rows use a seed from 0 to 999999 and are the same every time for the same seed.
  • The picture is a plain two-color image, with live cells dark green on white.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What does rule 30 mean?

It means the new cell is the bit of the number 30 (binary 00011110) chosen by the neighborhood. Neighborhoods 100, 011, 010 and 001 give 1, and the other four give 0.

Why does rule 90 make a triangle?

Each new cell is the XOR of its two neighbors, which is addition modulo 2, exactly the rule that builds Pascal's triangle modulo 2. The shape that results is the Sierpinski triangle.

How many different rules are there?

There are 256, one for each way to assign a 0 or 1 to each of the eight neighborhoods. Many of them are mirror images or inversions of each other, so fewer than 256 look truly different.

Can I get the same picture again?

Yes. For the single-cell and custom starts the picture is fixed by the rule, width, generations and edge setting. For random starts it also depends on the seed.