Transcript Slide 1

Logic Gates
The Inverter


The inverter (NOT circuit) performs the
operation called inversion or complementation.
Standard logic symbols:
1
input
output
output
input
1
Inverter Truth Table & Logic Expression
Input
Output
LOW (0)
0
1
1
0
HIGH (1)
HIGH (1)
LOW (0)
A
X=A
The AND Gate & Its Operation

The AND gate is composed of two or more
inputs and a single output.
A
A
X
B

&
X
B
For a 2-input AND gate:


Output X is HIGH only when inputs A and B are
HIGH
X is LOW when either A or B is LOW, or when
both A and B are LOW.
AND Gate Truth Table
INPUTS


A
B
OUTPUT
A
B
X
0
0
0
0
1
0
1
0
0
1
1
1
The total number of possible combinations of binary inputs to a
gate is determined by:
N = 2n
Therefore:
 2 bits (n=2) = 4 combinations
 3 bits = 8 combinations
 4 bits = 16 combinations
X
AND Gate – Logic Expressions

Use either:



X = A · B ,or
X = AB
A
X
B
If there are more than 2 inputs, do as below:
A
B
C
X= ABC
A
B
C
D
X= ABCD
The OR Gate

Like AND gate, an OR gate has two or more
inputs and one output.
A
A
X
X
B

≥1
B
For a 2-input OR gate:


output X is HIGH when either input A or input B is
HIGH, or when both A and B are HIGH.
X is LOW only when both A and B are LOW.
OR Gate Truth Table
A
X
B
INPUTS
OUTPUT
A
B
X
0
0
0
0
1
1
1
0
1
1
1
1
OR Gate – Logic Expressions

Use the operator + for OR operation


X=A+B
If there are more than 2 inputs, do as below:
A
B
C
X= A+B+C
A
B
C
D
X= A+B+C+D
The NAND Gate

NAND = NOT-AND
A
X
B

A
B
A
&
X
X
B
For a 2-input NAND gate:


Output X is LOW only when inputs A and B are
HIGH
X is HIGH when either A or B is LOW, or when
both A and B are LOW
NAND Gate Truth Table & Logic Expression
A
X
B
INPUTS

OUTPUT
A
B
X
0
0
1
0
1
1
1
0
1
1
1
0
The Boolean expression for the output of a 2input NAND gate is
X = AB
Negative-OR Equivalent Op of a NAND

For a 2-input NAND gate performing a
negative-OR operation

Output X is HIGH when either input A or input B is
LOW or when both A and B are LOW
NAND
Negative-OR
The NOR Gate

NOR = NOT-OR
A
B

X
A
B
A
≥1
X
X
B
For a 2-input NOR gate:


Output X is LOW when either input A or input B is
HIGH, or when both A and B are HIGH
X is HIGH only when both A and B are LOW
NOR Gate Truth Table & Logic Expression
A
X
B
INPUTS

OUTPUT
A
B
X
0
0
1
0
1
0
1
0
0
1
1
0
The Boolean expression for the output of a 2input NOR gate is
X = A+B
Negative-AND Equivalent Op of a NOR

For a 2-input NOR gate performing a
negative-AND operation

Output X is HIGH only when both inputs A and B
are LOW
NOR
Negative-AND
The XOR and XNOR Gates


Exclusive-OR and Exclusive-NOR gates are
formed by a combination of other gates
already discussed.
Because of their fundamental importance in
many applications, these gates are often
treated as basic logic elements with their own
unique symbols.
The XOR Gate
A
A
X
X
B

=1
B
For a 2-input exclusive-OR gate:


Output X is HIGH when input A is LOW and input
B is HIGH, or when input A is HIGH and input B is
LOW
X is LOW when A and B are both HIGH and both
LOW
XOR Gate Truth Table & Logic Expression
A
X
B
INPUTS

OUTPUT
A
B
X
0
0
0
0
1
1
1
0
1
1
1
0
The Boolean expression for the output of a 2input XOR gate is
X = A+B
The XNOR Gate
A
A
=1
X
B

X
B
For a 2-input exclusive-NOR gate:


Output X is LOW when input A is LOW and input
B is HIGH, or when input A is HIGH and input B is
LOW
X is HIGH when A and B are both HIGH and both
LOW
XNOR Gate Truth Table & Logic Expression
A
X
B
INPUTS

OUTPUT
A
B
X
0
0
1
0
1
0
1
0
0
1
1
1
The Boolean expression for the output of a 2input XNOR gate is
X = A+B