

Given two integers "first" and "second". Find the number of bits that do not match in the binary representation of the given numbers.
For example, let "first" be 11 and "second" be 15. Writing both the given numbers in binary we get first = 1011(binary representation of 11) and second = 1111(binary representation of 15) we can see all the bits are the same except the second bit.

Therefore only 1 bit differs hence we return 1 as shown in the diagram.
Note:1. Do not print anything, just implement the provided function and return the number of mismatching bits for the given numbers.
The first line of input contains an integer ‘T’ denoting the number of test cases.
The next ‘T’ lines represent the ‘T’ test cases.
The only line of each test case contains 2 space-separated integers "first" and "second"
Output Format
For each test case, print a single integer denoting the number of mismatched bits in their binary representation.
The output of each test case will be printed in a separate line.
1 <= T <= 10 ^ 5
0 <= first, second <= 10^9
Where ‘T’ is the total number of test cases and "first", " second" are the given numbers.
Time limit: 1 second
2
11 15
12 16
1
3
Test Case 1:
We get "first" is equal to 11 and "second" is equal to 15.
Converting to binary representation, we get
First = 11 = 2^3 + 2^1 + 2^0
First = 1011
Second = 15 = 2^3 + 2^2 + 2^1 + 2^0
Second = 1111

We can see that the first third and fourth bits are the same in both the numbers but the second bit is different, it is 0 in the first number and 1 in the second number. Since only 1 bit differs, we return 1.
Test Case 2:
We get "first" = 12 and "second" = 16.
Converting to binary, we get
First = 12 = 2^3 + 2^2
First = 01100
Second = 16 = 2^4
Second = 10000

We can clearly see that the first second and third bit differ(highlighted in red) therefore we return 3.
4
100 1000
5 13
6 20
21 23
5
1
2
1
Check if every bit is same or not
The key idea is to check for each bit if it is different or not.
Consider the following steps:
O(1)
In each case, we perform 30 operations which is a constant hence it takes constant time.
O(1).
We are using constant space