Bignum

Bignum objects hold integers outside the range of
Fixnum. Bignum objects
are created automatically when integer calculations would otherwise
overflow a Fixnum. When a calculation involving
Bignum objects returns a result that will fit in
a Fixnum, the result is automatically converted.

For the purposes of the bitwise operations and [], a Bignum is treated as if it were an infinite-length
bitstring with 2’s complement representation.

While Fixnum values are immediate, Bignum objects are not—assignment and parameter
passing work with references to objects, not the objects themselves.

“the number of bits” means that the bit position of the highest bit which
is different to the sign bit. (The bit position of the bit 2**n is n+1.) If
there is no such bit (zero or minus one), zero is returned.

Inverts the bits in big. As Bignums are conceptually 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.