BitNot
The BitNot function returns the bit-wise complement of a number. Use the NOT operation to invert the settings of all the bits in a number.
nResult = BitNot( n ) |
nResult is the bit-wise NOT of n.
n is an integer number.
The bit-wise NOT flips all 1 bits to 0 and vice versa. For example, consider the number 15. In binary notation this is expressed as 1111. Using all 32 buts, this number is 00000000000000000000000000001111. The bit-wise NOT sets all 0 bits to 1 and the lower 4 1-bits to 0, giving the result 11111111111111111111111111110000.
The following script performs the NOT of a number. Note that the result is printed using %u because it is considered an unsigned (i.e., 0 or positive) integer.
|
-- pick two numbers |
|
-- prints the result 4294967288 |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.