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, <[email protected]> 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 -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/RJLGYE4N7NR6JYFSA64VES375U45PIKW/ > Code of Conduct: http://python.org/psf/codeofconduct/ -- Antoine Rozo _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/JTVV74CXKBOZJ4REKXWQWU4WGEXSNDGJ/ Code of Conduct: http://python.org/psf/codeofconduct/
