319
WXOR, WXORP, DXOR, DXORP
1
2
3
4
4
6
7
8
7.1
Logical oper
atio
n instructions
7.1.5
W
XOR, WXORP, DXOR, DXORP
Program Example
(1) The following program performs an exclusive OR operation on the data at D10 and D20 when XA is ON, and stores the
result at D10.
[Ladder Mode]
[List Mode]
[Operation]
(2) The following program compares the bit pattern of the 32-bit data from X20 to X3F with the bit pattern of the data at D9
and D10 when X6 is ON, and stores the number of differing bits at D16.
[Ladder Mode]
[List Mode]
[Operation]
Remark
See Page 356, Section 7.5.2 for more information on the DSUMP instruction.
Step
Instruction
Device
0
0
1
1
1
0
0
1
0
0
1
1
1
0
0
1
0
1
1
0
1
1
0
0
0
1
1
0
1
1
0
0
b15
b8
b0
b7
b0
b7
b15
b8
XOR
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
b0
b7
b15
b8
D10
D20
D10
Step
Instruction
Device
0
D10
,
D9 1
1 1 1 0 0 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 1
b31
b16
b0
b15
1
D10
,
D9 1
1 0 1 1 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 1 0 0 0
X3
F
X30
X20
X2
F
1
X3
F
to
X20 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
X3C X3B X38 X37 X3
4
X33
X2C X2B X28 X27 X2
4
X23
XOR
b31
b16
b0
b15
17
+
1
+
1
+
1
D16
D
S
D
D
S
D