Skip to main content
Version: Next

bit_not

Computes the bit-wise NOT of its argument.

bit_not(x:number) -> number

Description

The bit_not function computes the bit-wise NOT of x. The operation inverts each bit in the binary representation of the number.

x: number

The number to perform bit-wise NOT on.

Examples

Perform bit-wise NOT on an integer

from {x: bit_not(5)}
{x: -6}

See Also

bit_and, bit_or, bit_xor, shift_left, shift_right