You are viewing a single comment's thread. Return to all comments →
Hi Jitendra414,
1^2=3
1 in binary is 01
2 in binary is 10
XOR of 01 and 10 = 11,
11 is 3 in decimal
And then your next input is 1
1^3=2
Hence the answer is 2
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer
You are viewing a single comment's thread. Return to all comments →
Hi Jitendra414,
1^2=3
1 in binary is 01
2 in binary is 10
XOR of 01 and 10 = 11,
11 is 3 in decimal
And then your next input is 1
1^3=2
Hence the answer is 2