105
Logic Instructions Section 3-11
3-11 Logic Instructions
Instruction
Mnemonic
Code
Symbol/Operand Function Location
Execution
condition
LOGICAL AND
ANDW
@ANDW
034
Output
Required
DOUBLE LOGI-
CAL AND
ANDL
@ANDL
610
Output
Required
LOGICAL OR
ORW
@ORW
035
Output
Required
DOUBLE LOGI-
CAL OR
ORWL
@ORWL
611
Output
Required
EXCLUSIVE OR
XORW
@XORW
036
Output
Required
I
1
: Input 1
I
2
: Input 2
R: Result word
ANDW(034)
I
1
I
2
R
Takes the logical AND of corresponding bits in single words of word data
and/or constants.
I
1
. I
2
→ R
00
I
1
I
2
R
111
100
010
0
I
1
: Input 1
I
2
: Input 2
R: Result word
ANDL(610)
I
1
I
2
R
Takes the logical AND of corresponding bits in double words of word data
and/or constants.
(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
00
0
I
1
: Input 1
I
2
: Input 2
R: Result word
ORW(035)
I
1
I
2
R
Takes the logical OR of corresponding bits in single words of word data
and/or constants.
I
1
+ I
2
→ R
I
1
I
2
R
111
101
011
00
0
I
1
: Input 1
I
2
: Input 2
R: Result word
ORWL(611)
I
1
I
2
R
Takes the logical OR of corresponding bits in double words of word data
and/or constants.
(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
101
011
00
0
I
1
: Input 1
I
2
: Input 2
R: Result word
XORW(036)
I
1
I
2
R
Takes the logical exclusive OR of corresponding bits in single words of word
data and/or constants.
I
1
. I
2
+ I
1
.I
2
→ R
I
1
I
2
R
110
101
011
00
0