7-2
7.1 Logical Operation Instructions
7.1
Logical Operation Instructions
(1) The logical operation instructions perform logical OR, logical AND or other logical operations
in unit of 1 bit.
Operation
Description
Formula for
Operation
Example
A
B
Y
Logical AND
(AND)
A bit is set to 1 only when both input A
and input B are 1, otherwise set to 0
Y
A / B
0
0
0
0
1
0
1
0
0
1
1
1
Logical OR
(OR)
A bit is set to 0 only when both input A
and input B are 0, otherwise set to 1
Y
A + B
0
0
0
0
1
1
1
0
1
1
1
1
Exclusive OR
(XOR)
A bit is set to 0 when input A and input
B are equal, otherwise set to 1
Y
A B + A B
0
0
0
0
1
1
1
0
1
1
1
0
Exclusive NOR
(XNR)
A bit is set to 1 when input A and input
B are equal, otherwise set to 0
Y
(A + B)(A + B)
0
0
1
0
1
0
1
0
0
1
1
1
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......