std-lognot | ![]() |
std-lognot calculates the bitwise (logical) NOT (1's complement) of the number.
It returns the integer representation of the bitwise inversion of the number.
The integer is represented as a signed shortnum, 15 + 1 bits.
Yes, it is the same as (~ int), only with a different name.~ is hard to read and remember.
bit => not 0 => 1 1 => 0
(std-lognot 0) => -1 (std-lognot 1) => -2 (std-lognot -1) => 0
int: Integer number.
A signed short integer. (16 bit)
None.
(std-require 'STDMATH)
Defined in STDMATH