write a function to determine the minimal number of bits you would need to flip to convert integer a to integer b for example input 29 or 11101 15 or 01111 output 2 count number of ones in diff count number of ones in diff
def count_flips_to_convert(a, b):

    diff = a ^ b

    
    count = 0
    while diff:
        diff &= (diff - 1)
        count += 1
    return count