#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    12
    Rep Power
    0

    Checking which bits are on / off


    I have 8-bit data and am interested in testing to count the number of bits in each byte that are turned on and those that are turned off. Does python allow me to do this (e.g. an equivalent of the f90 BTEST)?

    Thanks.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    217
    Rep Power
    0
    Maybe look into the bitwise '&' operator...

IMN logo majestic logo threadwatch logo seochat tools logo