Bitwise 'negate' (ones complement)
This takes one argument. It is converted to a signed 'long long' (64-bit integer). The result is the ones-complement of the number (zero bits become one, one bits become zero).
Also see bit.clear to achieve the same affect (clearing a bit).
See Also ...
bit.ashr - Shifts a number right, preserving sign
Lua base functions
(Help topic: lua=bit.neg)
Enter a search string to find matching documentation.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )