305
1
2
3
4
4
6
7
8
7.1 Logical operation instructions
CHAPTER 7 APPLICATION INSTRUCTIONS
7.1 Logical operation instructions
(1) The logical operation instructions perform logical sum, logical product or other logical operations in 1-bit units.
Category Processing Details Formula for Operation
Example
A B Y
Logical product
(AND)
Becomes 1 only when both input A and
input B are 1; otherwise, is 0
Y A · B
000
010
100
111
Logical sum
(OR)
Becomes 0 only when both input A and
input B are 0; otherwise, is 1
YA + B
000
011
101
111
Exclusive OR
(XOR)
Becomes 0 if input A and input B are
equal; otherwise, is 1
YA
· B + A · B
000
011
101
110
NON exclusive
logical sum
(XNR)
Becomes 1 if input A and input B are
equal; otherwise, is 0
Y(A
+ B)(A + B)
001
010
100
111