Bitwise XOR compares two binary numbers bit by bit. For each position, the result is:
0 XOR 0 = 01 XOR 1 = 00 XOR 1 = 11 XOR 0 = 1So XOR gives 1 when the two bits are different, and 0 when they are the same.
If one bit pair is 1 and 0, the result is 1. If the pair is 1 and 1, the result is 0. Keep going across all positions until every bit has been processed.
A good check is to verify each bit position independently. The final answer should have 1s exactly where the input bits differ, and 0s where they match. If you convert back to another number system, make sure the value matches the binary result exactly.
© 2023-2026 AI MATH COACH