16 Feb
2020
16 Feb
'20
10:13 a.m.
What would you expect ones_complement(1100) to return? (I'm guessing you'd expect a Python int with value 11.) What about ones_complement(11111100)? (I'm guessing that you'd also expect a Python int with value 11 here.) What would ones_complement(ones_complement(1100)) be? What would ones_complement(ones_complement(11111100)) be? .... we can use 0b1100 instead of 1100.Then the output of binary.twos_complement(0b1100) will be 0b0100