Application instructions (16-bit)
3.28
Application instructions (16-bit)
Application instructions (16-bit) are used when special processing is required.
3.28.1
Logical operation instructions
• Logical operation instructions are instructions that execute logical operations such as logical OR or logical AND.
• There are 10 types of logical operation instruction as shown below.
Instruction
Classification
WAND
Logical AND
WANDP
WOR
Logical OR
WORP
NOTE
• Logical operation instructions execute the following processes in increments of bits.
Classification
Logical AND
Logical OR
Exclusive OR
Exclusive NOR
172
Sequence program
Classification
symbol
Exclusive OR
Exclusive NOR
Set 1 when the inputs of both A and B are 1.
Set 0 in all other cases.
Set 0 when the inputs of both A and B are 0.
Set 1 in all other cases.
Set 0 when the inputs of both A and B are equal.
Set 1 when they are different.
Set 1 when the inputs of both A and B are equal.
Set 0 when they are different.
Instruction
Classification
symbol
WXOR
2's complement
(code reversed)
WXORP
WXNR
WXNRP
Process
Instruction
symbol
NEG
NEGP
Example
Formula
A
0
0
Y = A B
1
1
0
0
Y = A + B
1
1
0
0
Y = A B + A B
1
1
0
0
Y = (A + B) (A + B)
1
1
B
Y
0
0
1
0
0
0
1
1
0
0
1
1
0
1
1
1
0
0
1
1
0
1
1
0
0
1
1
0
0
0
1
1