


If βAβ is 13(1101) and βBβ is 7(0111), The number of bits that should be flipped is 2(0111).
The first line of the input contains an integer, 'T,β denoting the number of test cases.
The first line of each test case contains two integers, βAβ and βBβ.
For each test case, print βan integer corresponding to the minimum number of swaps required.
Print the output of each test case in a separate line.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 10
1 <= βAβ,βBβ <= 10^9.
Time limit: 1 sec
In this approach, we will simply iterate through all the bits of βAβ and βBβ and count the number of bits that are not matching, as if we just change these mismatched bits, we will find the number of bits that should be flipped.
At last, we will return βANSβ storing the number of flips required.
In this approach, we will first take the bitwise XOR of βAβ and βBβ in a variable βCβ.Now, the βCβ will contain only those bit sets that are mismatching in βAβ and βBβ for the following property of XOR:
0 XOR 0 is 0.
0 XOR 1 is 1.
1 XOR 0 is 1.
1 XOR 1 is 0.
We will simply count the number of set bits in βCβ and return the required number.