How does python enable bitwise operators without an integer bit limit

74 views Asked by At

Since python has no limit on the number of bits for storing an integer, how exactly does it perform bitwise operations on integers?

How many bits does it really store an integer in?

RealPython claims that there is no signed bit in python.

Then why is it that when the following code is executed, the sign is retained and the answer is -1?

print(-2 >> 1)
0

There are 0 answers