XOR
Usage: XOR dest,src Modifies flags: CF OF PF SF ZF (AF undefined)
Performs a bitwise 'exclusive OR' of the operands and returns the result in the destination.
Bitwise Exclusive OR
XOR r/m8,reg8 ; 30 /r [8086]
XOR r/m16,reg16 ; o16 31 /r [8086]
XOR r/m32,reg32 ; o32 31 /r [386]
XOR reg8,r/m8 ; 32 /r [8086]
XOR reg16,r/m16 ; o16 33 /r [8086]
XOR reg32,r/m32 ; o32 33 /r [386]
XOR r/m8,imm8 ; 80 /6 ib [8086]
XOR r/m16,imm16 ; o16 81 /6 iw [8086]
XOR r/m32,imm32 ; o32 81 /6 id [386]
XOR r/m16,imm8 ; o16 83 /6 ib [8086]
XOR r/m32,imm8 ; o32 83 /6 ib [386]
XOR AL,imm8 ; 34 ib [8086]
XOR AX,imm16 ; o16 35 iw [8086]
XOR EAX,imm32 ; o32 35 id [386]
XOR performs a bitwise exclusive OR (XOR) operation between its two operands (i.e. each bit of the result is 1 if and only if exactly one of the corresponding bits of the two inputs was 1), and stores the result in the destination (first) operand ; each bit is 0 if the corresponding bits are the same.
The MMX instruction PXOR performs the same operation on the 64-bit MMX registers.
EXAMPLE:
mov eax 00_1111_1111
xor eax eax ; eax = 0