Skip to content
Advertisement

Tag: representation

Binary Representations

Why is that However, Moreover, It seems, that first -5 is converted to 2’s compliment then operation is performed. Then, in case of ‘&’ output is printed/interpreted as such, but for | output is converted back to signed magnitude representation. Why is there such an asymmetry? Answer -5 in binary (two’s complement) is …111111111011. Python can handle arbitrary-precision integers and

Advertisement