XOR              Exclusive OR                        Flags: O D I T S Z A P C
0       * * * * 0
XOR destination,source

Logic:    destination   destination XOR source

XOR performs a bit-by-bit "exclusive or" on its two operands, and
returns the result in the destination operand.  The operands may be
bytes or words.

XOR Instruction Logic

                   Destination  Source    Result
0         0         0
0         1         1
1         0         1
1         1         0

XOR sets each bit of the result to 1 only one of the corresponding
bits is set to one.

                                                                          
Operands                  Clocks   Transfers  Bytes   Example
register, register          3          -        2     XOR CX,BX
register, memory        9(13) + EA     1       2-4    XOR CL,MASK_BYTE
memory, register       16(24) + EA     2       2-4    XOR ALPHA[SI],DX
accumulator, immediate      4          -       2-3    XOR AL,01000001b
register, immediate         4          -       3-4    XOR SI,00C2h
memory, immediate      17(25) + EA     2       3-6    XOR RETURN_CODE,0D2h
                                                                          

See also: OR
See also: AND
See also: NOT
See also: EA
See also: Flags

XOR Exclusive OR