W always get back the another half by XOR the another half one more time. Because Self-Inverse, b ^ b = 0
Tricks
Swapping values
public class MyClass { public static void main(String args[]) { int x=10; int y=25; x = x ^ y; // x ^ x = y, x ^ y = x y = x ^ y; // x x = x ^ y; // y System.out.println("x: " + x); System.out.println("y: " + y); }}