decimal to binary

Gary Herron gherron at islandtraining.com
Fri Jul 25 09:55:59 EDT 2003


On Friday 25 July 2003 05:21 am, manuel wrote:
> How to convert a decimal to binary ?
>
> thx,
>
>           Manuel

We probably need more information than that to answer your question.
For instance statement

  x = 123

converts the decimal number represented by the decimal digits 123 into
binary form and stores it in variable x. Of course you have no access
to the binary digits as

  print x

converts back to decimal to print "123"

So what is it you really want?

Gary Herron







More information about the Python-list mailing list