Neat XOR trick

This is a neat trick using XOR, the most mysterious of the logical operators. Best of all for embedded, it requires no temporary locations.

//swap two values in place
if(x < y)
{
  x = x ^ y;
  y = y ^ x;
  x = x ^ y;
}

Et voila!