439
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Logic Instructions
3
ANDW/ANDL
Function
Example Programming
When the execution condition CIO 0.00 is ON, the logical AND is taken of corresponding bits in CIO 11,
CIO 10 and CIO 21, CIO 20 and the results will be output to corresponding bits in D201 and D200.
z ANDW
ANDW(034) takes the logical AND of data specified in
I
1
and I
2
and outputs the result to R.
z ANDL
ANDL(610) takes the logical AND of data specified in
I
1
, I
1
+1 and I
2
, I
2
+1 and outputs the result to R, R+1.
I
1
, I
2
→ R
I
1
I
2
R
111
100
010
000
(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
111
100
010
000
S
1
: 10CH
S
1
+1: 11CH
S
2
: 20CH
S
2
+1: 21CH
D: D200
D+1: D201
Note: The vertical arrow indicates logical AND.
0.00
10
20
D200