Hi, I am trying to represent a number as a list of bits: for example the bit representation of the integer 8. I did find a number of articles pertaining to a module called bitarray but I was unable to download/install that package. I am using Linux on Ubuntu 9.10; Python 2.6.2.
I am almost certain there is a relatively easy way to convert an integer that can be represented by 32 bits into an array of bits that I can iterate over looking for switched on bits or switched off bits. Any information such as recipes or past articles in this list providing methods to create and manipulate bit arrays would be most appreciated. Robert
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor