Options  |  About
Other Logic Gates

All of the other gates are created using a combination of two or more of the AND, OR and/or NOT gates.



The NAND Gate

The NAND gate is just like the basic AND gate. The only difference is that the NAND gate inverts the final output. Here is the truth table for the NAND GATE:

INPUT

OUTPUT
A B Y
0 0 1
0 1 1
1 0 1
1 1 0

Although this gate seems fairly simple, it is more complex than any of the basic gates. As you can see by the truth table, the outputs are the exact opposite of the AND gate. This is achieved by using a combination of two basic gates, the AND and the NOT. Since it uses a combination of two basic gates, it is not considered a basic gate. Here is how the components of the NAND gate are arranged:

As you can see, the inputs go into an AND gate. The output of the AND gate is then inverted by the OR gate to achieve the result of the whole NAND gate. The NAND gate is really an AND gate with an inverted output.

Instead of having to use the combination of the two gates in the above diagram as a symbol for the NAND gate, a simplified symbol is used:

Note that the NOT gate has been replaced with a small circle. This small circle is commonly used to replace a whole NAND gate when designing logic circuits.



The NOR Gate

The NOR gate is the exact opposite of the OR gate. The output is HIGH only when all of the inputs are LOW. When any of the inputs are HIGH, the output is always HIGH. The NOR gate is also constructed using two basic gates. This time the OR and NOT gate are employed to create the NOR gate. Here is a diagram of the NOR gate along with the truth table:



INPUT

OUTPUT
A B Y
0 0 0
0 1 1
1 0 1
1 1 1

As you can see, the NOR gate is the same as the NAND gate except it uses an OR gate in place of the AND gate. To make diagrams simpler, the same thing is done with the NOR gate as was done with the NAND gate:



The XOR Gate

The EXCLUSIVE OR (XOR) gate is very commonly used in arithmetic circuits. The XOR gate compares the inputs. If both inputs (there can only be two inputs for this gate) are the same, the output is LOW. In contrast, if the inputs differ, then the output is HIGH. Here is the truth table for the XOR gate:

INPUT

OUTPUT
A B Y
0 0 0
0 1 1
1 0 1
1 1 0

The XOR gate is most complex of all gates; it requires two AND gates, two NOT gates, as well as an OR gate. Here is a diagram which shows how the five gates are arranged to create the XOR gate:

The A and B inputs are both split into two to allow them to be the inputs for two gates at the same time. The two inputs that were just created from the split are inverted. There are two AND gates. The two original inputs go to the different AND gates. The inverted input of A becomes the second input of the AND gate in which B is the other input. Likewise, the inverted input of B becomes the second input of the AND gate in which A is the other input. The outputs of the AND gates become the inputs of the OR gate. If either of the inputs is HIGH, then the output of the whole XOR gate is HIGH. Otherwise, the output of the XOR gate is LOW.

Just like the two other gates in this section, the XOR gate is simplified in diagrams. Here is the symbol used to represent the XOR gate:


Back Forward
Back Forward

Gates of Creation // Basic Hardware // Advanced Gates