Chapter 2 Logic Gates
Chapter 2 Logic Gates
University of Gondar
Institute of Technology
Department of Electrical Engineering
Digital Logic Design:
Chapter 2: Logic Gates
By:
Habtamu Maru
Outline
1 Introduction
Logic Gates
A logic gate is a simple switching circuit that determines whether
an input pulse can pass through to the output in digital circuits.
The building blocks of a digital circuit are logic gates, which exe-
cute numerous logical operations that are required by any digital
circuit. These can take two or more inputs but only produce one
output.
At any given moment, every terminal is in one of the two binary
conditions LOW (0) or HIGH (1), represented by different voltage
levels.
The numbers 0 and 1 represent the two possible states of a logic
circuit. The two states can also be referred to as ’ON and OFF’ or
’HIGH and LOW’ or ’TRUE and FALSE’.
Habtamu M. Digital Logic Design March 1, 2023 3 / 23
Digital Logic Design
Introduction
Truth table
A truth table is a means for describing how a logic circuit’s output
depends on the logic levels present at the circuit’s inputs.
The number of input combinations will equal 2N for an N-input
truth table.
Also note that the list of all possible input combinations follows
the binary counting sequence, and so it is an easy matter to write
down all of the combinations without missing any.
Types of Logic Gates
Truth table
gate waveforms
OR Gate
An OR gate can have two or more inputs with one output and
perform logical addition.
Let A and B represents two independent logic variables. When A
and B are combined using the OR operation the result Y can be
expressed as Y = A+B.
Habtamu M. Digital Logic Design March 1, 2023 7 / 23
Digital Logic Design
Types of Logic Gates
In this expression the + sign does not stand for ordinary addition;
it stands for the OR operation.
The OR gate operates so that its output is HIGH (logic 1) if either
input A or B or both are at a logic 1 level. The OR gate output will
be LOW (logic 0) only if all its inputs are at LOW (logic 0).
Truth table
AND Gate
The AND gate composed of two or more inputs and a single output.
The AND gate output is equal to the AND product of the logic inputs; that
is, X= AB or X=A.B, this is the AND operation.
The . sign is usually omitted so that the expression simply becomes X=AB
In other words, the AND gate is a circuit that operates so that its output is
HIGH only when all its inputs are HIGH. For all other cases, the AND gate
output is LOW.
Truth table
NAND gate
The term NAND is a contraction of NOT-AND and implies an AND function
with a complemented (inverted) output.
The symbol of NAND gate is the same as the AND gate symbol except for
the small circle on its output.
This small circle denotes the inversion operation. Thus, the NAND oper-
ates like an AND gate followed by an INVERTER and the output expression
for the NAND gate is X=AB.
The NAND gate is a popular logic element because it can be used as uni-
versal gate: that is NAND gate can be used in combination to perform the
AND, OR, and NOT operations.
Truth table
The AND output goes HIGH only when all inputs are HIGH, while
the NAND output goes LOW only when all inputs are HIGH.
NOR gate
The term NOR is a contraction of NOT-OR and implies an OR func-
tion with an inverted (complemented) output.
It is the same as the OR gate symbol except that it has a small
circle on the output.
The small circle represents the inversion operation. Thus, the NOR
gate operates like an OR gate followed by an INVERTER.
The Boolean output expression for the NOR gate with two inputs,
X=A + B
NOR gate operation is equivalent to negative operation of AND.
gate.
Truth table
An OR gate output goes HIGH when any input is HIGH; the NOR
gate output goes LOW when any input is HIGH.
Truth table
The XNOR produces a HIGH output whenever the two inputs are
at the same level.
The output expression is X=AB+A B which indicates along with
the truth table that x will be 1 for two cases: A=B=1 (the AB term)
and A=B=0 (the A B term).
Truth table
HOME WORK
There are three doors in a room with a light switch next to each
one. you can turn ON the light from any door when you enter and
you can turn OFF the light from any door when you leave.
I Write the truth table for the function
I Draw the logic circuit for the function
I check if it possible to realize the function with a single logic gate
!! !
OU
K Y
A N
T H
Habtamu M. Digital Logic Design March 1, 2023 23 / 23