You mean how you can do the thing in the first post? Well, it all comes down to the ones and zeroes, really byte a = 133, b = 44; a ^= b ^= a ^= b; What this does is as follows: Note: a + b does not mean a sum here. It means a sort of a mix. First, a is a and b is b. The first op (a ^= causes a to become a mix of a and b (a is now a + The second op (b ^= a) causes b to become a! What it does is this: it takes a (which is a + and then removes itself ( from that value. So a + b becomes just a. And the last op (a ^= removes the a part (which is now in from a + b (which is in a) and a becomes only b.