What is 1100111111 here? A number written in decimal where you want to interpret digits as binary digits? Why don't you use 0b1100111111 to have a litteral written in binary representation? Le dim. 16 févr. 2020 à 16:32, <ananthakrishnan15.2001@gmail.com> a écrit :
I'll show the example using one's and two's complement.
binary.ones_complement(1100111111) 0011000000 binary.twos_complement(1100111111) 0011000001
Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@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/RJLGYE... Code of Conduct: http://python.org/psf/codeofconduct/
-- Antoine Rozo