16 Feb
2020
16 Feb
'20
3:39 p.m.
On Sun, 16 Feb 2020 at 15:34, <ananthakrishnan15.2001@gmail.com> wrote:
I'll show the example using one's and two's complement.
binary.ones_complement(1100111111) 0011000000
But these aren't standard Python types - well, technically, 1100111111 is 1,100,111,111 - 1 billion, 100 million 111 thousand one hundred and eleven, but I suspect that's not what you intend. And the output - 0011000000 - is not how Python would print a standard integer type, so either it's a new type (with its own representation) or you're not actually using standard Python types. Are you actually looking for some form of "bit string" type? Paul