Tamm, Heiko wrote:


Ok, thank you.


Does anybody know how to convert a HEX into a BINARY?



Just trying my hand out on python : To convert the value of i to binary:

==================
i = 456
s = ''
while i:
    s = str(i % 2) + s
    i/=2

print s
=================

in case you have i in the form of a hex string, you can always add "i=int(i,16)" before the loop.

- Sandip
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to