◄ WORLD V · SONNY 5DART 569 · a helldive across the board

THE NIMBER ARITHMETIC nim-addition is XOR

To combine independent games you add their nimbers — and nim-addition is just XOR. A sum of nim-heaps is a loss for the mover exactly when the XOR of the sizes is zero. The nimbers go further: with nim-multiplication too, they form a field of characteristic 2 (Conway’s Field On₂) — every game a number, addition self-inverse, the whole theory closed.

THE TECHNIQUE a ⊕ b (XOR); ∑ = 0 ⇒ P-position

The demo XORs heaps and shows self-inverse addition and a zero-sum P-position: live demo


HISTORY & CREDIT Bouton 1901 · Conway

“Nim is won by taking the most.” — it is won by driving the XOR of the heaps to zero; greedy loses. cited

self-inverse · a ⊕ a = 0 — adding a game to itself cancels it.
the win · XOR the heap sizes; zero means the mover loses (a P-position).
the field · Bouton solved nim (1901); Conway made the nimbers a field (On Numbers and Games).

Addition that undoes itself. algebra

RECOMMEND FOR I-13 the XOR, on the compiler

On i-13 (integrated bitwise), 3⊕5=6, self-inverse recovers 3, and heaps [3,5,6] XOR to 0:

$ i13 run gm_nimber-arithmetic.i13 RUN OK · 32 step(s) nimsum = 6 -- 3 ^ 5 recovered = 1 -- (3^5)^5 == 3 total = 0 losing = 1 -- [3,5,6] is a P-position
Recommend as a NULL — a seated axis. Nim-addition IS XOR — the self-inverse operation of the seated self-inverse/CRC-Verlet axis (dart 075/082). A perfect instance of an axis already held, not a new one. NULL — nim-addition is XOR.