Truth table for xor – Zilog Z16F2810 User Manual
Page 204

XOR Instruction
UM018809-0611
188
ZNEO
®
CPU Core
User Manual
XOR
Definition
Logical Exclusive OR
Syntax
XOR dst, src
Operation
dst
dst XOR src
Description
The source operand value is logically exclusive-ORed with the destination operand. An XOR
operation stores a 1 in a destination operand bit when the original destination bit differs from the
corresponding source operand bit; otherwise XOR stores a 0. The contents of the source operand
are unaffected. Table 23 summarizes the XOR operation.
Flags
Table 23. Truth Table for XOR
dst
src
Result (dst)
0
0
0
1
0
1
0
1
1
1
1
0
7
6
5
4
3
2
1
0
C
Z
S
V
B
CIRQE IRQE
–
*
*
0
*
–
–
–
Legend
Z
= Set to 1 if the result is zero; otherwise, set to 0.
S
= Set to 1 if the result msb is 1; otherwise set to 0.
V
= Cleared to 0.
B
= Set to 1 if the initial destination or source value is 0; otherwise set to 0.
CIRQE
= No change.
IRQE
= No change.