Sure, xor’ing a register with itself is the idiom for zeroing it out, but why not sub?
The article discusses why XOR became the most popular idiom for zeroing out a register in assembly programming, rather than using subtraction. It examines the historical and technical reasons behind this convention.