Department of Electrical Engineering
ELEC261 - Digital Systems Design
Discrete Implementations of Logic
Functions
Lecture 4 Prof. F Bensaali
Content:
• Introduction
• Direct synthesis of logic functions from Boolean
Form
• Synthesis of logic functions using specific gate
types
o NOT gate
o AND gate
o OR gate
o NOR gate
o EXOR gate
o EXNOR gate
2
Introduction
Introduction
There are many alternative technologies available to the digital
designer
o The most fundamental being the interconnection of a number of
discrete logic gates to implement the required logic function
Electronic logic gates are almost never packaged singly
o e.g., a 7400 is a logic chip that contains four NAND gates
o One aspect of good digital design is to maximise the usage of
each package and hence keep the overall chip count to a
minimum
NOTE: All electronic logic packages are based on electronic switching
transistors, a power supply must therefore be connected to the
package in order for it to operate. This is typically 5V for TTL.
3
Introduction (Cont’d)
Introduction (Cont’d)
Logic chip example:
7408 Pinout
7421 Pinout 7411 Pinout
4
Direct synthesisofoflogic
Direct synthesis logicfunctions
functions from
from Boolean
Boolean form
form
This is simply a case of remembering that:
o Boolean PRODUCTS are implemented by AND gates
o Boolean SUMS are implemented by OR gates
o INVERTED VARIABLES (or functions) are implemented by NOT
gates
OR
Then work your way through the expression and sketch and
interconnect appropriate gates until every term is included
5
Direct
Directsynthesis
synthesis of
of logic functions
functionsfrom
fromBoolean
Boolean form
form
(Cont’d)
(Cont’d)
Example
Sum of products implementation: f = (W.X) + (Y.Z)
1. Select the gates that correspond with each term in the function:
f = (W.X) + (Y.Z)
2. Interconnect the gates to form the function:
6
Direct
Directsynthesis
synthesis of
of logic functions
functionsfrom
fromBoolean
Boolean form
form
(Cont’d)
(Cont’d)
Example
Product of sums implementation: g = (W+X) . (Y+Z)
1. Select the gates that correspond with each term in the function:
2. Interconnect the gates to form the function:
7
Direct
Directsynthesis
synthesis of
of logic functions
functionsfrom
fromBoolean
Boolean form
form
(Cont’d)
(Cont’d)
Example
Mixed implementation: h=(a + b) (c . d)
1. Select the gates that correspond with each term in the function:
h = (a + b) (c . d)
2. Interconnect the gates to form the function:
a (a) ( a +b)
b
(a + b) (c . d)
c
d (c . d)
(d)
8
Synthesisof
Synthesis oflogic
logic functions
functions using
usingspecific
specificgates
gatestypes
types
It is sometimes desirable to be able to build up certain logic
functions using only NAND gate
o This can be carried out from a truth table, or more elegantly, by the
application of Boolean algebra in appropriate manner
We will consider the synthesis of six fundamental logic
functions: NOT, AND, OR, NOR, EXOR and EXNOR
o All of the synthesis is based on the Boolean relation for NAND
gate:
f= .B
NAND
9
Synthesisof
Synthesis oflogic
logic functions
functions using
usingspecific
specificgates
gatestypes
types
(Cont’d)
(Cont’d)
NOT gate
To synthesis an inverter using a two-input NAND gate we simply let
A=B by hard-wiring the two inputs together:
10
Synthesisof
Synthesis oflogic
logic functions
functions using
usingspecific
specificgates
gatestypes
types
(Cont’d)
(Cont’d)
AND gate
All we need to do to synthesis an AND gate from NAND’s is to
invert the output:
11
Synthesisof
Synthesis oflogic
logic functions
functions using
usingspecific
specificgates
gatestypes
types
(Cont’d)
(Cont’d)
OR gate
Comparing (10) and (1) we note that (10) is simply the NAND of A
and B
To synthesis an OR from NAND’s we invert the inputs to the
NAND gate
A A
A . B = A+B
B
B
12
Synthesisof
Synthesis oflogic
logic functions
functions using
usingspecific
specificgates
gatestypes
types
(Cont’d)
(Cont’d)
NOR gate
The NOR gate is simply the inverse of an OR function
We just add a NAND inverter to the logic diagram of an OR gate
This could be justified by applying the double inversion technique
13
Synthesisof
Synthesis oflogic
logic functions
functions using
usingspecific
specificgates
gatestypes
types
(Cont’d)
(Cont’d)
EXOR gate
(13) Can be directly implemented using five NAND gates:
A A
A.B
(A . B).(A . B)
B B A.B
14
Synthesisof
Synthesis oflogic
logic functions
functions using
usingspecific
specificgates
gatestypes
types
(Cont’d)
(Cont’d)
EXNOR gate
The same applies here as for the NOR gate
We simply attach a NAND inverter to the output of the EXOR gate
A A
A.B
(A . B).(A . B) (A . B).(A . B)
B B A.B
EXOR
15
Synthesis of logic functions using specific gates types
Exercise
Exercise
Answer the following questions related to the function F(W,X,Y) as
defined by its minterms below:
F(W,X, Y) =
a. Enter the minterms and maxterms on a suitable K-map and
deduce the minimal 1st canonical form for F(W,X,Y).
b. For economy reasons it was decided to implement the
function F using NAND gates. Obtain NAND equivalent
expression for F.
c. Draw a full logic diagram to implement F in its NAND form.
16
Synthesis of logic functions using specific gates types
Solution
Solution
a. K-map and 1st canonical form:
2 groups
2 IC FOR THIS EQUATION
b. NAND equivalent:
c. The logic diagram to implement F in its NAND form:
ONLY 1 IC
17