Position of rightmost different bit | Python3 implementation to find the position of rightmost different bit in two number . ; Function to find rightmost different bit in two numbers . ; Driver code
from math import floor , log10 NEW_LINE def posOfRightMostDiffBit ( m , n ) : NEW_LINE INDENT return floor ( log10 ( pow ( m ^ n , 2 ) ) ) + 2 NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT m , n = 52 , 4 NEW_LINE print ( " Position ▁ = ▁ " , posOfRightMostDiffBit ( m , n ) ) NEW_LINE DEDENT