What is the meaning of XOR in x86 assembly?

前端 未结 11 1904
醉梦人生
醉梦人生 2020-12-13 08:50

I\'m getting into assembly and I keep running into xor, for example:

xor     ax, ax

Does it just clear the register\'s value?

11条回答
  •  旧时难觅i
    2020-12-13 09:47

    xor register, register is commonly used to 'zero' a register, because all bits are compared with each other:

    0-bits stay zero. 1-bits become zero, because 1 XOR 1 is also 0.

提交回复
热议问题