Binary number manipulation
Matthew A. Berglund
matt at satbp.com
Fri Nov 28 16:00:23 EST 2003
Hello All!
I am very new to python so I am working on some ass-umptions which may be incorrect (please forgive me).
I am working on a problem that requires me to take 2 decimal integers, each of which represents half of a word. I need to slap these things together and get out another decimal integer.
A couple of questions:
1. Is there a way to typecast a variable as a binary?
2. If 1 is no, does that mean that I need to do all the manipulation in some icky string format and then go back?
I do see the bit-wise operations available and this looks like I need to simply perform these on my integers? Can it really be that simple?
Thanks,
Matt
More information about the Python-list
mailing list