Not

(Engine-Level Function)

Description: Returns the result of a bitwise logical NOT operation.
Returns: Signed 64-bit integer
Function Groups: Bitwise Operation
Usage: Script or steady state.
Related to: And | Or | XOr
Format: Not(Value)
Parameters:  
Value
Required. Any numeric expression.
Comments:

This function produces the binary compliment of a value. It takes all the bits of a binary number and flips them. Each 1 becomes 0 and each 0 becomes 1.

This function takes signed 64-bit integers values. If a number is passed outside the range of a signed 64-bit integer, then the function will return invalid. If Value is invalid, the return value is invalid.

(See: Bitwise Parameters & Operations)

Examples:

r = Not(1);
s = Not(-1);
t = Not(0);
u = Not(-3);

The values of r, s, t and u will be -2 (0xFFFFFFFFFFFFFFFE), 0 (0x0000000000000000), -1 (0xFFFFFFFFFFFFFFFF) and 2 (0x0000000000000002) respectively.