Common development:
int temp = a;
a = b;
b = temp;
Adding:
a = a + b;
b = a - b;
a = a - b;
By bit XOR:
a=a^b;
b=a^b;
a=a^b;
Note: by bit XOR mode, requiring only an integer; a and b are as indexing arrays, two values can not be the same - or else to a lower target value and b is 0.