0% found this document useful (0 votes)
11 views

Chapter 2 Logic Gates

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Chapter 2 Logic Gates

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Digital Logic Design

University of Gondar
Institute of Technology
Department of Electrical Engineering
Digital Logic Design:
Chapter 2: Logic Gates
By:
Habtamu Maru

Habtamu M. Digital Logic Design March 1, 2023 1 / 23


Digital Logic Design

Outline

1 Introduction

2 Types of Logic Gates

3 Universality of NAND Gates And NOR Gates

4 Alternate Logic Gate Representations

Habtamu M. Digital Logic Design March 1, 2023 2 / 23


Digital Logic Design
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

In most logic gates, the low state is approximately zero volts (0


V), while the high state is approximately positive five volts (+5V).
Boolean algebra
The Boolean value of 0 might be assigned to any voltage in the
range from 0 to 0.8V, while the Boolean value of 1 might be as-
signed to any voltage in the range 2 to 5V.
The digits/ symbols 1 and 0 are related to the logic levels in this
algebra; in electrical circuits, logic 1 will represent a closed switch,
a high voltage, or “on” state. An open switch, low voltage, or “off”
state of the device will be represented by logic 0.
In Boolean algebra, there are no fractions, decimals, negative num-
bers, square roots, cube roots, logarithms, imaginary numbers,
and so on.
Habtamu M. Digital Logic Design March 1, 2023 4 / 23
Digital Logic Design
Types of Logic Gates

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

Basic Logic Gates Universal Logic Gates Other Logic Gates


NOT Gate Exclusive OR (XOR)
NOR Gate
OR Gate Exclusive NOR
NAND Gate
AND Gate (XNOR)
Habtamu M. Digital Logic Design March 1, 2023 5 / 23
Digital Logic Design
Types of Logic Gates

NOT Gate (Inverter)


This gate always has only a single input, and its output logic level
is always opposite to the logic level of this input.
It inverts (complements) the input signal at all points on the wave-
form so that whenever the input is 0, output is 1, and vice versa.
The inverter (NOT circuit ) performs the operation called inversion
or completion.
The Boolean expression of NOT gate having input of A and output
of X is: X=A, this expression is read as X equals NOT A or X equals
the inverse of A or X equals the complement of A.

Habtamu M. Digital Logic Design March 1, 2023 6 / 23


Digital Logic Design
Types of Logic Gates

Truth table

Figure: symbol for NOT Figure: sample

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

Figure: Symbol for OR gate

Habtamu M. Digital Logic Design March 1, 2023 8 / 23


Digital Logic Design
Types of Logic Gates

Example:An alarm system in chemical process


In many industrial control systems, it is required to activate an output
function whenever any one of several inputs is activated.

I The temperature transducer


circuit produces an output
voltage proportional to the
process temperature.

This voltage, VT , is compared with a temperature reference voltage, VTR ,


in a voltage comparator circuit.
The comparator output, TH , is normally a low voltage (logic 0), but it switches
to a high voltage (logic 1) when VT exceeds VTR , indicating that the pro-
cess temperature is too high. A similar arrangement is used for the pres-
sure measurement.
Habtamu M. Digital Logic Design March 1, 2023 9 / 23
Digital Logic Design
Types of Logic Gates

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

Figure: Symbol for a three input AND


gate.

Habtamu M. Digital Logic Design March 1, 2023 10 / 23


Digital Logic Design
Types of Logic Gates

Example: Enable gate and Inhibit gate

I Enable gate means allowance


of data through a channel
and Inhibit gate is just the re-
verse of that process i.e. dis-
allowance.

We are going to show an enabling operation to understand it in


an easier way. Suppose in the measurement of frequency of a
pulsed waveform.
For measurement of frequency a gating pulse of known frequency
is sent to enable the passage of the waveform whose frequency
is to be measured.
Habtamu M. Digital Logic Design March 1, 2023 11 / 23
Digital Logic Design
Types of Logic Gates

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.

NAND gate operation is equivalent to negative OR gate. (please check ?)

Habtamu M. Digital Logic Design March 1, 2023 12 / 23


Digital Logic Design
Types of Logic Gates

Truth table

Figure: (a) NAND symbol; (b)


equivalent circuit

The AND output goes HIGH only when all inputs are HIGH, while
the NAND output goes LOW only when all inputs are HIGH.

Habtamu M. Digital Logic Design March 1, 2023 13 / 23


Digital Logic Design
Types of Logic Gates

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.

Habtamu M. Digital Logic Design March 1, 2023 14 / 23


Digital Logic Design
Types of Logic Gates

Truth table

Figure: (a) NOR symbol;(b)


equivalent circuit

An OR gate output goes HIGH when any input is HIGH; the NOR
gate output goes LOW when any input is HIGH.

Habtamu M. Digital Logic Design March 1, 2023 15 / 23


Digital Logic Design
Types of Logic Gates

EXCLUSIVE-OR (XOR) Gates


Two special logic circuits that occur quite often in digital systems
are the XOR and XNOR circuits.
The output of Exclusive OR produces a HIGH output whenever the
two inputs are at opposite levels.

Truth table

Figure: XOR circuit


Figure: Traditional XOR symbol

Habtamu M. Digital Logic Design March 1, 2023 16 / 23


Digital Logic Design
Types of Logic Gates

An XOR gate has only two inputs; there are no three-input or


four-input XOR gates. The two inputs are combined so that
X=AB+AB.But currently more that two inputs XOR gates are
applicable.
A shorthand way of XOR output expression is X=A⊕B
Quiz:Write the truth table for three inputs XOR gate?
Exclusive–NOR:
The exclusive-NOR circuit (Abbreviated XNOR) produces a HIHG
output whenever the two inputs are at the same level.
It should be apparent that the output of the XNOR circuit is the
exact inverse of the output of the XOR circuit.
The traditional symbol for an XNOR gate is obtained by simply
adding a small circle at the out put of the XOR symbol.
Habtamu M. Digital Logic Design March 1, 2023 17 / 23
Digital Logic Design
Types of Logic Gates

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

Figure: XNOR circuit

Figure: Traditional XNOR symbol


Habtamu M. Digital Logic Design March 1, 2023 18 / 23
Digital Logic Design
Universality of NAND Gates And NOR Gates

Universality of NAND Gates And NOR Gates


It is possible to implement any logic expression using only NAND
and NOR gates and no other type of gate.
This is because NAND and NOR gates, in the proper combination,
can be used to perform each of the Boolean operations OR, AND,
and INVERT

Habtamu M. Digital Logic Design March 1, 2023 19 / 23


Digital Logic Design
Universality of NAND Gates And NOR Gates

Habtamu M. Digital Logic Design March 1, 2023 20 / 23


Digital Logic Design
Alternate Logic Gate Representations

Alternate Logic Gate Representations


Standard and alternate symbols for various logic gates and
inverter(standard at the left and alternate symbol in the right).

Habtamu M. Digital Logic Design March 1, 2023 21 / 23


Digital Logic Design
Alternate Logic Gate Representations

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

Habtamu M. Digital Logic Design March 1, 2023 22 / 23


Digital Logic Design

!! !
OU
K Y
A N
T H
Habtamu M. Digital Logic Design March 1, 2023 23 / 23

You might also like