
128
Program Configuration
Section 7-4
Relational Operators
Relational operators compare two values. The output is “–1” (&HFFFF) if the
two values are equal and “0” if they are not.
Logical Operators
Logical operators perform tests on multiple relations, bit manipulations, or
Boolean operations. The logical operator returns a bitwise result that is either
“true” (not 0) or “false” (0). In an expression, logical operations are performed
after arithmetic and relational operations. The outcome of a logical operation
is determined as shown in the following table. The operators are listed in the
order of precedence.
Relational operator
Example
Operation
=
A
=
B
Equal
< >
,
> <
A
< >
B
Not equal
<
A
<
B
Less than
>
A
>
B
Greater than
< =
,
= <
A
< =
B
Less than or equal to
> =
,
= >
A
> =
B
Greater than or equal to
Logical Operator
Description, Example, and Result
NOT (negation)
A
NOT A
1
0
0
1
AND (logical product)
A B
A AND B
1 1
1 0
0 1
0 0
1
0
0
0
OR (logical sum)
A B
A OR B
1 1
1 0
0 1
0 0
1
1
1
0
XOR (exclusive-OR)
A B
A XOR B
1 1
1 0
0 1
0 0
0
1
1
0
EQV (equivalence)
A B
A EQV B
1 1
1 0
0 1
0 0
1
0
0
1
IMP (implication)
A B
A IMP B
1 1
1 0
0 1
0 0
1
0
1
1
Summary of Contents for C200H-ASC11
Page 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Page 2: ...iv...
Page 4: ...vi...