
Feb. 16, 2020
4:22 p.m.
ananthakrishnan15.2001ï¼ gmail.com wrote:
we can use 0b1100 instead of 1100.Then the output of binary.twos_complement(0b1100) will be 0b0100
That would be printed as `4`. Is that what you want? Supposing we accept that `binary.twos_complement(0b1100) == 0b0100`. What would `binary.twos_complement(0b0011)` be equal to? What about `binary.twos_complement(0b00000011)`?