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 demo XORs heaps and shows self-inverse addition and a zero-sum P-position: live demo
“Nim is won by taking the most.” — it is won by driving the XOR of the heaps to zero; greedy loses. cited
Addition that undoes itself. algebra
On i-13 (integrated bitwise), 3⊕5=6, self-inverse recovers 3, and heaps [3,5,6] XOR to 0: