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

xyx AND y
00 0
01 0
100
111

AND Gate
AND gates are used to determine when both inputs are true.


The NAND Gate

xyx NAND y
001
011
101
110

NAND Gate
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

xyx OR y
000
011
101
111

OR Gate
OR gates are used to determine when at least one input is true.


The NOR Gate

xyx NOR y
001
010
100
110

NOR Gate
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
000
011
101
110

XOR Gate
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

xNOT x
01
10

NOT Gate
NOT gates return the opposite of the input.


The BUFFER Gate

xBUFFERED x
00
11

BUFFER
BUFFERS return a delayed output which is the same as the input.


The TSB (Tri-State Buffer) Gate

x y TSB out
00-
010
10-
111

TSB Gate
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 and B) = -(-A or -B). Additionally, (A or B) = -(-A and -B). These substitutions, along with the fact that -(-A) = A, can often be used to simplify circuits.


Back to the Table of Contents.