XOR'ing a register with itself is the idiom for zeroing it out. Why not sub?

https://devblogs.microsoft.com/oldnewthing/20260421-00/?p=112247

#HackerNews #XOR #zeroing #sub #register #programming #coding

Sure, xor'ing a register with itself is the idiom for zeroing it out, but why not sub? - The Old New Thing

Somehow xor became the most popular version.

The Old New Thing