Purpose: Performs a bitwise NOT of the integer expression.
Syntax: result = Bnot x
Guidelines: The Bnot operator performs a bitwise NOT operation on a numeric expression. The expression is converted to an integer (32 bits) before the BNOT operation takes place.
For each of the 32 bits in the result, the bit will be set to 1 if the corresponding bit in the argument is 0; the bit will be set to 0 if the corresponding bit in the argument is 1.
Example:
|
x = 45 '0010 1101 binary |
|
print Bnot x 'prints: -46 |