


The first line of input contains an integer 'T’, denoting the number of test cases. The test cases follow.
The first line of each test case contains two integers, ‘N’ and ‘M’.
Print the minimum number of operations needed to convert from ‘N’ to ‘M’.
Print the output of each test case in a new line.
1<= T <= 10^4
0 <= N, M <= 10^9
Where ’T’ is the number of test cases and ‘N’,’M’ are the given integers.
Time Limit: 1 sec
The idea is to iterate through each bit of the two numbers, and if at any position the bits of N and M are different, we will flip that bit in N.
The idea is to take the xor of both the numbers and then count the number of set bits in the xor of N and M. The number of bits in the XOR of both the given numbers will be equal to the number of bits that are different in N and M.
The steps are as follows:
In this process, we unset the rightmost set bit at once. The number of times this loop will run will be equal to the number of set bits.