Uhhhh xor does not act like you think it does.
PHP Code:
var_a = 1; // or in binary, 000......0001
var_b = 2; // or in binary, 000......0010
var_c = var_a xor var_b; // only where one of the bits from either variable's binary values is 1, so we get 000.......0011, or 3.
And for the others:
<<
PHP Code:
var_a = 3; // or in binary, 000......0011
var_b = 2;
var_c = var_a << var_b; // shifting the binary left twice to yield 000.......1100, or 12.
>>
PHP Code:
var_a = 6; // or in binary, 000......0110
var_b = 2;
var_c = var_a >> var_b; // shifting the binary right twice to yield 000.......0001, or 1.
~
PHP Code:
var_a = 0; // or in binary, 000.....0000
var_b = ~var_a; // yields binary 111.....1111, or -1.
This is not necessarily true for unsigned long integers, but I don't think Graal deals with them, so.... yeah. But if we did, ~0 would be 4294967295.