Getting at the bits of a 32-bit integer

Scott David Daniels Scott.Daniels at Acm.Org
Wed Aug 25 17:31:32 CEST 2004

Grant Edwards wrote:

>... That's a bit, um, conceited.  Somebody's got to twiddle all
> those low-level bits out there to provide the infrastructure
> that makes the world run.
> I'm one of those people, and I need to do bit-twiddling quite
> often while implimenting various communications protocols.

If you are interested in such things, take a look at:

It lets you do things like look at bit-ranges of (int, long, float)
and find things like msb, lsb, particular bits (bit) and
extract bit ranges.

-Scott David Daniels
Scott.Daniels at Acm.Org

More information about the Python-list mailing list