|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
Maybe look into the bitwise '&' operator...
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Checking which bits are on / off |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|