Performs a bitwise NOT operation.
BitNOT ( value )
Parameters
value | The number to operate on. |
Return Value
Returns the bitwise NOT of the value.
Remarks
Remember hex notation can be used for numbers.
Related
BitAND, BitOR, BitShift, BitXOR, Hex
Example
$x = BitNot(5)
#cs Comments:
Result is -6 because for 32-bit numbers
5 == 00000000000000000000000000000101 binary
-6 == 11111111111111111111111111111010 binary
and the first bit is signed
#ce