| |
Exclusive OR
86/88 |
Y |
186 |
Y |
286 |
Y |
386 |
Y |
486 |
Y |
XOR destination, source |
Ovfl |
0 |
Dir |
N |
Int |
N |
Trap |
N |
Sign |
Y |
Zero |
Y |
Aux |
? |
Prty |
Y |
Carry |
0 |
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.
------------------------------------ Timing ----------------------------------
OpCode Instruction 386 286 86
34 ib XOR AL, imm8 2 3 4
35 iw XOR AX, imm16 2 3
35 id XOR EAX, imm32 2
80/6 ib XOR r/m8, imm8 2/7 3/7 4/17+EA
81/6 iw XOR r/m16, imm16 2/7 3/7 4/17+EA
81/6 id XOR r/m32, imm32 2/7
83/6 ib XOR r/m16, imm8 2/7
83/6 ib XOR r/m32, imm8 2/7
30/r XOR r/m8, r8 2/6 2/7 3/16+EA
31/r XOR r/m16, r16 2/6 2/7 3/16+EA
31/r XOR r/m32, r32 2/6
32/r XOR r8, r/m8 2/7 2/7 3/9+EA
33/r XOR r16, r/m16 2/7 2/7 3/9+EA
33/r XOR r32, r/m32 2/7
------------------------------------ Logic -----------------------------------
destination = destination XOR source
See Also OR AND NOT Flags |