How to count number of 1s in binary representation in python July 8, 2019 16 32 64 128 Python binary number