Andw (And Word); Orw (Or Word); Xorw (Exclusive Or Word) - IDEC FC4A-C10R2 User Manual

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

12: B
OOLEAN
Introduction
Boolean computations use the AND, OR, and exclusive OR statements as carried out by the ANDW, ORW, and XORW
instructions in the word data type, respectively.

ANDW (AND Word)

ANDW(W)
S1(R)
*****
S1 = 1
S2 = 1
D1 = 1

ORW (OR Word)

ORW(W)
S1(R)
*****
S1 = 1
S2 = 1
D1 = 1

XORW (Exclusive OR Word)

XORW(W)
S1(R)
*****
S1 = 1
S2 = 1
D1 = 0
Applicable CPU Modules
FC4A-C10R2/C
FC4A-C16R2/C
X
C
OMPUTATION
S2(R)
D1(R)
REP
*****
*****
**
1
1
0
0
1
0
0
0
1
1
0
0
0
0
1
S2(R)
D1(R)
REP
*****
*****
**
1
1
0
0
1
0
0
0
1
1
1
1
0
1
1
S2(R)
D1(R)
REP
*****
*****
**
1
1
0
0
1
0
0
0
1
1
1
1
0
1
0
FC4A-C24R2/C
X
X
« FC4A M
I
NSTRUCTIONS
S1 · S2 → D1
When input is on, 16-bit data designated by source operands S1
and S2 are ANDed, bit by bit. The result is set to destination
operand D1.
S1
0
0
1
1
S1 + S2 → D1
When input is on, 16-bit data designated by source operands S1
and S2 are ORed, bit by bit. The result is set to destination oper-
and D1.
S1
0
0
1
1
S1 ⊕ S2 → D1
When input is on, 16-bit data designated by source operands S1
and S2 are exclusive ORed, bit by bit. The result is set to desti-
nation operand D1.
S1
0
0
1
1
FC4A-D20K3/S3
X
S
U
'
M
ICRO
MART
SER
S
ANUAL
S2
D1
0
0
1
0
0
0
1
1
S2
D1
0
0
1
1
0
1
1
1
S2
D1
0
0
1
1
0
1
1
0
FC4A-D20RK1/RS1 & FC4A-D40K3/S3
X
»
12-1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents