What type is Z? You haven't shown it's declaration.
The first one is NOT XOR, which is not the same as NOR.
5 % 3 is a modulo (remainder) operation. The remainder of 5 / 3 is 2. So (5 % 3) is also true.
^ is an XOR operation. true XOR true is false. ! (false) is of course true.
& is a bitwise AND operation 3 & 1 is 1. That leaves us with true - 1 which is a mix of types. Since true can be promoted to an int we have 1 - 1, which is 0. 0 == 0 is true, so Z is true.