Omron CP1E-E@@D@-@ Computer Hardware User Manual


 
2-211
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Logic Instructions
2
ANDW/ANDL
Function
Sample program
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.
ANDW
ANDW(034) takes the logical AND of data spec-
ified in I
1
and I
2
and outputs the result to R.
ANDL
ANDL(610) takes the logical AND of data speci-
fied 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
10.00 0
10.01 1
10.02 0
10.03 1
10.04 0
11.13 1
11.14 1
11.15 0
ANDL
10
20
D200
0.00
S
1
: 10CH
S
1
+1: 11CH
20.00 1
20.01 1
20.02 0
20.03 0
20.04 1
21.13 1
21.14 0
21.15 0
S
2
: 20CH
S
2
+1: 21CH
00 0
01 1
02 0
03 0
04 0
13 1
14 0
15 0
D: D200
D+
1
: D201
Note The vertical arrow indicates logical AND.