NOT

The NOT function is used to perform a logical negation on a number.

Syntax

result = NOTA

Remarks

If bit in          The result

A is               is

0                   1

1                   0

Although NOT is a bit-wise operator, it is often used to test Boolean (True/False) conditions. 0 is false and any non-zero number is true. Because NOT is a bit-wise operation, the only non-zero number that NOT can operate on and return 0 is -1. The binary representation of -1 has all bits equal 1. That is why the predefined constant True = -1.

NOT (-1) = 0

NOT (0) = -1

NOT (NAN) = NAN

NAN = Not a number