The XOR gate ( Exclusive OR ) is a logic gate that outputs 1 ( true ) when exactly one of its inputs is 1 ( true ) . That means that if both of its inputs are the same , the output will be 0 ( false ) .
If a logic gate were to accept three or more inputs and produce a true output if exactly one of those inputs were true , then it would in effect be a one-hot detector ( and indeed this is the case for only two inputs ) .