← ProblemsCircuits / Sequential Logic / More Circuits
Rule 90
15%cellular-automatavectorsRule 90 is a one-dimensional cellular automaton: a row of cells, each 0 or 1, all updating once per clock cycle. Each cell's next state is the XOR of its two neighbors:
q[i] <= q[i-1] ^ q[i+1]
Build a 512-cell version, q[511:0]. The boundaries are fixed at 0: cell 0's missing neighbor q[-1] and cell 511's missing neighbor q[512] both read as 0. When load is 1, load data[511:0] into q instead of stepping. There is no reset.
(Seeded with a single 1, this rule famously draws a Sierpiński triangle over time.)