Position of rightmost different bit | C # implementation to find the position of rightmost different bit in two number . ; function to find rightmost different bit in two numbers . ; Driver code
using System ; class GFG { static int posOfRightMostDiffBit ( int m , int n ) { return ( int ) Math . Floor ( Math . Log10 ( Math . Pow ( m ^ n , 2 ) ) ) + 2 ; } public static void Main ( String [ ] args ) { int m = 52 , n = 4 ; Console . Write ( " Position ▁ = ▁ " + posOfRightMostDiffBit ( m , n ) ) ; } }