On Sun, 16 Feb 2020 at 15:34, <ananthakrishnan15.2...@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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/W64DBXP53OIYFZLHPXMB54E5XXKPAALZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to