The best solution I know of is:
a, i = 11, 0
while a > 0:
a, i = a & a-1, i + 1
If there are k bits set out of n bits, it only does k iterations.