
This is the 5-state Busy Beaver champion, the Turing machine 1RB1LC_1RC1RB_1RD0LE_1LA1LD_1RZ0LA.
Started on a blank tape it runs for exactly 47,176,870 steps, then halts with 4,098 ones on the tape.
No 5-state machine that halts runs longer.
The chip holds only the machine's state (3 bits) and head position (14 bits). The tape lives in an external asynchronous SRAM, one bit per cell. The 14-bit address wraps, so the tape is a ring of 16,384 cells; the machine only ever visits 12,289 of them.
The clock runs at twice the step rate, and each step is split into four half-periods:
| Half-period | What happens |
|---|---|
| 1 (clk high) | The address is the head position. The SRAM drives the data pin and the chip latches the symbol at the end. |
| 2 (clk low) | WE# goes low. The SRAM releases the data pin. |
| 3 (clk high) | The chip drives the new symbol. WE# goes high at the end and the SRAM stores it. |
| 4 (clk low) | Address and data are held, then the head moves and the state changes. |
WE# pulses exactly once per step and stops for good when the machine halts, so a counter on WE# shows the step count. The address pins show the head moving, which is the visualization.
ui[0]) and hold it for at least 33,000 clocks. The chip writes a zero to all 16,384 cells and
then waits.uio[7]): there are exactly
47,176,870, taking 94,353,740 clocks (about 47 seconds at 2 MHz), and then WE# stays high.ui[1]) to walk the head across the tape, one cell every two clocks, without writing. The data
pin shows each cell in turn; a full lap contains 4,098 ones.Raising CLEAR again at any time wipes the tape and restarts the run.
An asynchronous SRAM with at least 14 address lines that runs at 3.3 V, for example an AS6C62256 (32K x 8, 55 ns).
| Chip pin | SRAM pin |
|---|---|
uo[7:0] |
A7..A0 |
uio[5:0] |
A13..A8 |
uio[6] |
I/O0 |
uio[7] |
WE# |
Tie CE#, OE# and any unused address pins to ground. Power the SRAM from 3.3 V, not 5 V. Pull the unused SRAM data pins to ground through 10 kΩ resistors, and add a 100 kΩ pull-down on I/O0.
Optional: LEDs or a logic analyser on the address pins, and a counter on WE#.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | CLEAR (hold high >= 33000 clocks to zero the tape; run starts when it goes low) | SRAM A0 | SRAM A8 |
| 1 | SCAN (after halt, walk the head right to read out the tape) | SRAM A1 | SRAM A9 |
| 2 | SRAM A2 | SRAM A10 | |
| 3 | SRAM A3 | SRAM A11 | |
| 4 | SRAM A4 | SRAM A12 | |
| 5 | SRAM A5 | SRAM A13 | |
| 6 | SRAM A6 | SRAM I/O0 (tape data, bidirectional) | |
| 7 | SRAM A7 | SRAM WE# (one pulse per step; stops at halt) |