You are given two numbers A and B. Write a program to count number of bits needed to be flipped to convert A to B.
The first line of input contains an integer T denoting the number of test cases. T testcases follow. The first line of each test case is A and B separated by a space.
For each testcase, in a new line, print the number of bits needed to be flipped.
1 ≤ T ≤ 100
1 ≤ A, B ≤ 103
A = 01010
B = 10100
Number of bits need to flipped = 4
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.