The way to understand this is to consider a single bit. The numbers are made up from a sequence of bits, and swapping the numbers means swapping the bits.
So if we understand how the swap works for a single bit then that explains how it works for numbers made up from many bits.