
Instruction Set
Logical
3-23
logical instructions continued...
Instruction
Description
OR
When the input conditions are true, the processor evaluates an OR operation (bit-by-bit)
between Source A (D9:3) and Source B (D9:4) and stores the result in the Destination (D9:5).
The truth table for an OR operation is:
Source A
Source B
Result
0
0
0
1
0
1
0
1
1
1
1
1
Exclusive OR
XOR
When the input conditions are true, the processor evaluates an exclusive OR operation
(bit-by-bit) between Source A (D9:3) and Source B (D9:4) and stores the result in the Destination
(D9:5). The truth table for an XOR operation is:
Source A
Source B
Result
0
0
0
1
0
1
0
1
1
1
1
0
BITWISE INCLUS OR
Source A
D9:3
3F37
Source B
D9:4
00FF
Dest
D9:5
3FFF
OR
BITWISE EXCLUS OR
Source A
D9:3
3F37
Source B
D9:4
3F37
Dest
D9:5
0000
XOR
Status Bit
Description
C
always resets
V
always resets
Z
sets if the result is zero; otherwise resets
S
sets if the most significant bit (bit 15 for decimal or bit 17 for octal) is set (1); otherwise resets