Skip to content
The Nexus
TECHNOLOGYApr 22 · 06:38 UTCHACKER NEWSingve

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

The article explains that in assembly programming, XOR'ing a register with itself is a common idiom to zero it out, and discusses why subtraction is not used for the same purpose. It references a Microsoft blog post and Hacker News comments for context.

Nexus surfaces and summarizes. The full story lives at the source.

Mentioned
Spot something wrong with this article?Report a problem →
Forward this