xor of p and q can be expressed as follows code example Example: XOR 0 | 0 | 0 0 | 1 | 1 1 | 0 | 1 1 | 1 | 0 ONLY ONE CAN BE TRUE