(~ number)
Apply the 1s compliment.
This function returns the bitwise NOT of a number. The number must be an integer.
Examples
This expression | Returns |
---|---|
(~ 10) | -11 |
(~ 0) | -1 |
(~ -25) | 24 |
Apply the 1s compliment.
This function returns the bitwise NOT of a number. The number must be an integer.
Examples
This expression | Returns |
---|---|
(~ 10) | -11 |
(~ 0) | -1 |
(~ -25) | 24 |