What is the meaning of XOR in x86 assembly?

前端 未结 11 1888
醉梦人生
醉梦人生 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条回答
  •  遥遥无期
    2020-12-13 09:39

    It determines the logical eXclusive OR

    0 XOR 0 = 0
    0 XOR 1 = 1
    1 XOR 0 = 1
    1 XOR 1 = 0
    

    So, TRUE only if one of the expressions is true, not both.

提交回复
热议问题