-
Notifications
You must be signed in to change notification settings - Fork 9
BASIC NOT Operator
TYPE: BASIC Logical Operator
FORMAT: NOT numeric
Action:
The NOT logical operator "complements" the value of each bit in its single operand, producing an integer "twos-complement" result. In other words, the NOT is really saying, "if it isn't. When working with a floating-point number, the operands are converted to integers and any fractions are lost. The NOT operator can also be used in a comparison to reverse the true/false value which was the result of a relationship test and therefore it will reverse the meaning of the comparison. In the first example below, if the "twos-complement" of "AA" is equal to "BB" and if "BB" is NOT equal to "CC" then the expression is true.
EXAMPLES of NOT Operator:
10 IF NOT AA = BB AND NOT(BB = CC) THEN...
NN = NOT 96: PRINT NN
-97
NOTE: To find the value of NOT use the expression X=(-(X+1)). The two's complement of any integer is the bit complement plus one.
To Search for pages in the wiki, press Pages above and type a search term in the "Find a page..." box. Results will update beneath automatically.
- Aquarius+ User Guide
- Quick Start
- Hardware
-
C Language Development Resources