Make your own free website on Tripod.com
 Search: Lycos Tripod      Walk the Line
share this page Share This Page  report abuse Report Abuse  build a page Edit your Site  show site directory Browse Sites  hosted by tripod
    Previous | Top 100 | Next hosted by tripod

Chapter 2 - More Logic Gates

The Exclusive OR Gate

This gate is often referred to as the XOR or EOR gate (pronounced "Eee-ore" as in Winnie the Pooh). It is similar to the simple OR gate, in that the output is high (1) if either of the two inputs is one and the other is off, but unlike the simple OR gate, the output goes to 0 if both the outputs are 1.

Input A
Input B
Output
0
0
0
0
1
1
1
0
1
1
1
0

Some people prefer to think of the XOR gate as producing a 1 output when both the inputs are different and a 0 output when both the inputs are the same.

The NAND Gate

This gate resembles an AND gate except that it has the small circle that we associate with the inverter tacked on the output. This is precisely what a NAND gate does. It performs an AND function on the two inputs and then inverts the output, so that in a situation where an AND gate produces a 0, a NAND date produces a 1 and vice-versa.

Input A
Input B
Output
0
0
1
0
1
1
1
0
1
1
1
0

The NAND gate is exactly equivalent to an AND gate followed by a NOT gate (inverter). Indeed, this is why it is called a NAND - it stands for NOT AND.

The NOR Gate

You are probably way ahead of me on this one, and have already guessed that a NOR gate is a NOT OR gate. Correct! The NOR gate performs an OR function on the two inputs and then inverts the output. This means that when either or both of the two inputs is 1, the NOR gate produces 0. Only when both the inputs are 0 does it produces 1.

Input A
Input B
Output
0
0
1
0
1
0
1
0
0
1
1
0

The XOR, NAND and NOR gates can, like any other gate, be used in combination with as many gates as you like in large circuits of gates.

Multi-input AND and OR

The AND, OR, NAND and NOR gates can be used in a version that has three or more inputs.

Three-input AND gate
Four-input OR gate

These work in exactly the same way that you would expect them to. The multi-input AND produces a 1 output if and only if all the inputs are 1. Otherwise it produces 0. The multi-input OR gate produces a 1 as long as at least one (any one) of its inputs is 1. It only produces 0 if all the inputs are 0.

The multi-input NAND gate works in exactly the same way as the multi-input AND except that the output is inverted, i.e. the only time that the gate produces a 0 is when all the inputs are 1. For any other combination of inputs the gate produces a 1. Similarly, the multi-input NOR gives the opposite result to the multi-input OR. It only produces a 1 when all the inputs are 0. Otherwise it produces a 0 output.

Below I have produced the truthtables for the 3-input OR and the 4-input AND gates. Although versions with more than four inputs exist, the truthtables for them are simply too long to put on this web page.

Input 1
Input 2
Input 3
Output
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
1
1
1

Input 1
Input 2
Input 3
Input 4
Output
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
1
0
0
1
0
0
0
0
1
0
1
0
0
1
1
0
0
0
1
1
1
0
1
0
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
1
0
1
1
0
0
0
1
1
0
1
0
1
1
1
0
0
1
1
1
1
1


Go back
Main Menu
Questions
Go on