Using the Arduino as an XOR logic gate

Hi there,
I am doing a project that I planned on using an XOR logic gate for, but just learned I am not allowed to use that part. Is there a way to take two inputs and have the arduino itself act as the logic gate? For instance, I have two inputs going into the board, if either of the inputs are one I want the output to be 1, If both of the inputs are 0 (or both 1) I want the output to be zero.
Thanks in advance :slight_smile:

The ^ opererator performs an XOR of the operands. Like this:

output = input1 ^ input2