443
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Logic Instructions
3
XORW/XORL
Function
Example Programming
When the execution condition CIO 0.00 is ON, the logical exclusive OR is taken of corresponding bits in
CIO 901, CIO 900 and D1001, D1000 and the results will be output to corresponding bits in D1201 and
D1200.
z XORW
XORW(036) takes the logical exclusive OR of data
specified in I
1
and I
2
and outputs the result to R.
z XORL
XORL(612) takes the logical exclusive OR of data
specified in I
1
and I
2
as double-word data and outputs
the result to R, R+1.
1
•
2
+
1
•
2
→
I
1
I
2
R
110
101
011
000
(I
1,
I
1
+1)
•
(I
2
, I
2
+1)
+ (I
1
, I
1
+1)
•
(I
2
, I
2
+1)
→
(R, R+1)
I
1,
I
1
+1 I
2,
I
2
+1
R, R+1
110
101
011
000
Note: The symbol indicates exclusive logical OR.
S
1
: 900CH
S
1
+1: 901CH
S
2
: D1000
S
2
+1: D1001
D: D1200
D+1: D1201
0.00
900
D1000
D1200
D1000
D1001
D1200
D1201