This function returns minimum number of bits to be flipped in X and Y to make X | Y = Z
def minimumFlips ( X , Y , Z ) : NEW_LINE INDENT res = 0 NEW_LINE while ( X > 0 or Y > 0 or Z > 0 ) : NEW_LINE DEDENT