Preview
We’re now ready to meet our last two gates, Xora and Xnora, illustrated above. We’ve already seen Ora the OR gate and her negation, Nora the NOR gate. In this episode, we introduce a variation on the OR gate, called the XOR (pronounced “ex-or”) gate as well as its negation, called the XNOR (pronounced “ex-nor”) gate.
Play
First, let’s play with the inputs of the XOR gate. Notice how the symbol is similar to—but a little different from—the symbol for the OR gate. Notice what happens when the inputs are the same and when they’re different. How would you use words to describe how the inputs affect the output?
Hint: if the interactive tool does not work on your device, you can watch this video.
Does the XOR gate remind you of any gates you have already seen? You might notice that the OR gate and the XOR gate are almost identical. The X in XOR stands for “exclusive” so we sometimes call the XOR gate the “exclusive OR” gate. What is the main difference between the OR gate and the XOR gate?
Since A OR B is represented by A+B and XOR is so similar to OR, the notation for A XOR B is also similar to the notation for A OR B. Namely, A XOR B is represented by $A \oplus B$.
In the following exercises, we’ll need to type answers like “A XOR B”. We can type this in two different ways:
- A xor B (“xor” must be lower case), or
- A \oplus B (the usual Boolean representation, which looks like $A \oplus B$).
Progress
Next, let’s look at the negation of the XOR gate. Play with the inputs of the XOR gate and its negation, the XNOR gate. Notice that the symbol of the XNOR gate looks like the symbol for the XOR gate, but it has a little circle on the output, just like we saw with the negations in the previous episode. How does this change the outputs?
Hint: if the interactive tool does not work on your device, you can watch this video.
As is usual for negations, the Boolean expression for A XNOR B combines the notation for XOR and NOT:
$( A \oplus B)’$
Practice
Now you’ve learned 3 representations (diagram symbol, truth table, and Boolean expression) of 7 different logic gates (NOT, AND, OR, XOR, NAND, NOR, and XNOR). This means you’ve learned 21 different representations! Check which representations you remember by playing the flashcard game below.