| check | result |
|---|---|
| x & C == x % 8, for x = 0…9999 | true |
| (x−1) & C == (x−1) % 8, including the wrap through zero | true |
Which means the modulus is not an operation the machine performs — it is the shape of the register. Nothing decides to wrap. There is simply nowhere else for the bit to go.LIT
000 0 HLT stop 001 1 INC A = (A+1) & C 010 2 DEC A = (A-1) & C 011 3 SWP A <-> B 100 4 ADD A = (A+B) & C 101 5 LDA A = M[B] 110 6 STA M[B] = A 111 7 BNZ if A != 0 then PC = B
Seven working instructions and a stop. That is the minimum that can still change data, move it, combine it, reach memory and branch — and three bits happens to give you exactly eight slots. The set is not designed so much as discovered by running out of room.
And look at the two ends. HLT is 000 — the empty word stops the
machine, so uninitialised memory is a halt rather than a crash. BNZ is 111, which is
C itself: the instruction that breaks the flow carries the same bit pattern as the wall that bounds
every value. Nobody chose that. It falls out of the width.LIT
—
Click any memory cell to cycle its opcode. The ring at the top is the program counter: PC is three bits, so it is a mod-8 wheel. Running off the end of memory is not an error — it is the loop. This machine cannot not loop.LIT
Eight cells of ADD SWP ADD SWP ADD SWP ADD SWP, seeded A=1 B=1. No branch
instruction anywhere in the program — the PC wheel supplies the loop. Reading A at each ADD boundary:
machine 1 1 2 3 5 0 5 5 2 7 1 0 1 direct 1 1 2 3 5 0 5 5 2 7 1 0 1 ← Fibonacci mod 8, computed separately
So the register width and the number theory are the same wall. The Pisano period of 8 is not something the machine computes — it is the length of the machine's own orbit.LIT
The state space is A × B × PC × memory = 8 × 8 × 8 × 8⁸ = 8¹¹ = 8,589,934,592 = 2³³. Finite. By pigeonhole any run longer than that must revisit a state, and this machine is deterministic, so revisiting a state means cycling forever. Every program provably halts or provably cycles, and you can decide which by running it.
| outcome | count | share |
|---|---|---|
| HALT | 12,298 | 61.49% |
| CYCLE | 7,702 | 38.51% |
| ran past the cap | 0 | 0.00% |
Longest cycle actually observed: 128 steps. The pigeonhole bound is 67,108,864× looser than anything that happened. A bound that is true and useless is still a bound, and it is worth saying that out loud rather than quoting 8¹¹ as if it meant something.LIT
And the trade is the same one this whole session has been about: the box buys you decidability and charges you unbounded computation. This kernel is not Turing complete — finite memory, finite registers, finite PC — and that is precisely why every question about it has an answer. Uncomputability is a privilege of infinite tape.AMB — the analogy across the session is a reading, the arithmetic is not
| "ab" | read as two registers, A and B. Could equally be a→b as source and destination, or a/b addressing modes. The ISA re-cuts either way. |
| C = 7 as a data register | built as the mask, not as storage — because | . | reads as a walled value. If C is meant to hold data too, it needs its own slot and the opcode count changes. |
| the three checkpoints | A, B, C matches the cyclic A·B·C you named early in the session. I did not build that link in — it is noted, not claimed. |