method

~

Importance_1
v2_6_3 - Show latest stable - 0 notes - Class: Integer
~() public

One’s complement: returns a number where each bit is flipped.

Inverts the bits in an Integer. As integers are conceptually of infinite length, the result acts as if it had an infinite number of one bits to the left. In hex representations, this is displayed as two periods to the left of the digits.

sprintf("%X", ~0x1122334455)    #=> "..FEEDDCCBBAA"
Show source
Register or log in to add new notes.