Logic Gates
AND Gates | NAND Gates | OR Gates | NOR Gates | XOR Gates | NOT Gates | BUFFER Gates | Tri-State Buffers | DeMorgan's Laws
The AND Gate
x y x AND y 0 0 0 0 1 0 1 0 0 1 1 1
AND gates are used to determine when both inputs are true.
The NAND Gate
x y x NAND y 0 0 1 0 1 1 1 0 1 1 1 0
NAND gates are negated AND gates. They are true when at least one input is not true.As a side note, it is often easier (and cheaper) to buy NAND gates instead of AND gates. This is due to the fact that on the transistor level, the number of transistors required to construct a NAND gate is less than the number needed for an AND gate. Ask your professor or an electrical engineer why this is so.
The OR Gate
x y x OR y 0 0 0 0 1 1 1 0 1 1 1 1
OR gates are used to determine when at least one input is true.
The NOR Gate
x y x NOR y 0 0 1 0 1 0 1 0 0 1 1 0
NOR gates are negated OR gates. They are true when all inputs are not true.
The XOR (eXclusive OR) Gate
x y x XOR y 0 0 0 0 1 1 1 0 1 1 1 0
XOR gates are true when an odd number of inputs are true.Note that an XNOR Gate is true only when an even number of inputs are false.
The NOT Gate
x NOT x 0 1 1 0
NOT gates return the opposite of the input.
The BUFFER Gate
x BUFFERED x 0 0 1 1
BUFFERS return a delayed output which is the same as the input.
The TSB (Tri-State Buffer) Gate
x y TSB out 0 0 - 0 1 0 1 0 - 1 1 1
Tri-State Buffers only have output when current is applied to the enable input (y in the diagram and table). When an enable signal is present, the output is true when the primary input (x in the diagram and table) is true, and false when the primary input is false. When the enable is off, the TSB effectively has infinite resistance, preventing any signal whatsoever from flowing through the gate. We will discuss this in more detail later in the online discussions.
DeMorgan's Laws
Although not directly related to logic gates, DeMorgan's Laws are quite important in digital logic. As you may recall from CMSC 150, (A
B) = -(-A
-B). Additionally, (A
B) = -(-A
-B). These substitutions, along with the fact that -(-A) = A, can often be used to simplify circuits.
Related Pages
- Half and Full Adders
- Traffic Between Subsystems
Back to the Table of Contents.