NOT Operator
NOT Operator
Syntax
result = NOT numeric-expression
The logical-complement operator evaluates each bit in numeric-expression,
then sets the corresponding bit in the result according to the following
table:
─────────────────────────────────────────
Bit in Expression Bit in Result
─────────────────────────────────────────
1 0
0 1
─────────────────────────────────────────
This inverts the bit values of any variable. If an integer variable has
the value 0 (false), the variable becomes -1 (true), and vice-versa.