When I write like below
int [] test = {4};
int a = test[0]^=1;
int b = test[0]^1;
I can get this output.
OUTPUT
test[0]^=1 : 5 a : 101
test[0]^1 : 4 b : 100
I think that test[0] = 100 -> test[0]^1 = 101 but it is not.
100
XOR 1
----------
101
Would you expain what is different?