a kernel · three bits · A B and the wall
| . |   C = 7 = 111

Three bits leaves no room
for an argument.

So every instruction has to be complete on its own — there is no operand field, because the opcode eats the whole word. That single constraint writes the entire instruction set for you. And C is not a data register. C is 7, C is 111, and C is the thing every value hits on the way round. | . | is a value walled on both sides, which is exactly what a 3-bit register is.

C does the wrapping

every % 8 in the machine is really & C
checkresult
x & C == x % 8, for x = 0…9999true
(x−1) & C == (x−1) % 8, including the wrap through zerotrue

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

plainly. A three-bit box can hold 0 to 7 and nothing else. Add one to seven and you get zero, not because a rule said so but because there is no fourth bit to carry into. C is the name of that edge.

The instruction set, forced

eight opcodes because three bits gives eight
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

The machine, running

single-step it · edit memory by clicking a cell
A
0
000
B
0
000
C — the wall
7
111
PC
0
000
STEP
0
—

—

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

Fibonacci, and the wall it hits

ADD SWP, no jump at all

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
FAULT I CAUGHT IN MY OWN RUN. First pass reported MATCH: False — machine period 24 against π(8) = 12. That was the wrong granularity: the program spends two instructions per Fibonacci term, so 24 machine-steps ÷ 2 = 12 terms. π(8) = 12. It matches exactly. The wrong unit made a true thing look false, which is the usual shape of that mistake.LIT after the correction

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

There is no halting problem in here

a census of 20,000 random programs

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.

outcomecountshare
HALT12,29861.49%
CYCLE7,70238.51%
ran past the cap00.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

plainly. Because the machine only has so many possible situations, if you run it long enough it must land in one it has been in before — and being a machine, it then does exactly the same thing again forever. So you can always find out whether a program stops, just by watching. Bigger computers lose that guarantee, and that loss is what makes them powerful.

What is still open

flagged, not filled
"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 registerbuilt 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 checkpointsA, 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.