(as for how, it assumes that unsigned is 32 bit, and xors all of its bits together - first 16 and the second 16, then first 8 of the result with the last 8, then first 4 of that result with the last 4, then first 2 with the last 2, then the first bit with the last bit. At that moment, the last bit holds the result of all those xors, and the rest of the bits has garbage, so it ands out that last bit and returns it)