The big idea in plain words
Picture a number as a row of light switches, each one either on (1) or off (0). Bit tricks let you flip, read, and combine those switches directly, which is about as fast as a computer can go. The star of the show is XOR, a 'toggle': pairing any switch with itself turns it off, because a XOR a = 0.
Example: find the number that appears only once in [4, 1, 2, 1, 2] while every other number appears twice. XOR them all together; the matching pairs cancel each other out (1 XOR 1 = 0, and 2 XOR 2 = 0), leaving just 4 - the lonely value - and you used no extra memory at all.