for number in (random.randint(0, 1 << 32) for _ in range(16)):
    print('%20i,%4i, %4i' % (number, number.bit_length() - 1, len(bin(
        number)) - 3))
find largest power of two less than X number?