Page 19-5
The LOGIC menu
The LOGIC menu, available through the BASE (‚ã) provides the following
functions:
The functions AND, OR, XOR (exclusive OR), and NOT are logical functions.
The input to these functions are two values or expressions (one in the case of
NOT) that can be expressed as binary logical results, i.e., 0 or 1.
Comparisons of numbers through the comparison operators =, ≠, >, <, ≤, and
≥, are logical statements that can be either true (1) or false (0). Some examples
of logical statements are shown below:
Functions AND, OR, XOR, and NOT can be applied to comparison statements
under the following rules:
These functions can be used to build logical statements for programming
purposes. In the context of this Chapter, they will by used to provide the result
of bit-by-bit operations along the lines of the rules provided above. In the
following examples, the base number system is indicated in parentheses:
1 AND 1 = 1 1 AND 0 = 0 0 AND 1 = 0 0 AND 0 = 0
1 OR 1 = 1 1 OR 0 = 1 0 OR 1 = 1 0 OR 0 = 0
1 XOR 1 = 0 1 XOR 0 = 1 0 XOR 1 = 1 0 XOR 0 = 0
NOT(1) = 0 NOT(0) = 1