Owner's manual
Publication 1746-RM001A-US-P
3-6 Expressions and Operators
Logical Operators
The module contains a complete set of logical operators that are divided into two
groups: dual-operand operators and single-operand operators.
The general form of all dual-operand instructions is:
(expr) OP (expr), where OP is one of the following logical operators.
These operators perform BIT-WISE logical operations on numbers between 0
(0000H) and 65535 (0FFFFH) inclusive. If the argument is outside this range,
then the module generates an
ERROR: BAD ARGUMENT message and returns to
Command mode. All decimal places are truncated, not rounded. Use the following
table for bit manipulations on 16-bit values.
.AND.
Use the logical .AND. operator to logically AND expressions together.
.OR.
Use the logical .OR. operator to logically OR expressions together.
.XOR.
Use the logical exclusive .XOR. operator to logically XOR expressions together.
Table 3.2 Bit Manipulations on 16-Bit Values
X Y X .AND.Y X .OR.Y X .XOR.Y
00000
01011
10011
11110
Example Result
>PRINT 3.AND.2 2
Example Result
>PRINT 1.OR.4 5
Example Result
>PRINT 7.XOR.6 1