You are on page 1of 22

Digital Systems

Lecture 4

Dr.-Ing. Erwin Sitompul


President University
http://zitompul.wordpress.com
2 0 1 6
President University Erwin Sitompul Digital Systems 4/1
Lecture Digital Systems

Terms in Digital Logic Design


 Synthesis: the design of a new circuit that implements a desired
function and behavior.
 Analysis: the task of determining the function and behavior of an
existing circuit.

President University Erwin Sitompul Digital Systems 4/2


Lecture Digital Systems

Example of Synthesis
Given the following truth table, A B Y
design the circuit
0 0 1
0 1 1
1 0 0
1 1 1

From the truth table, we now write the Sum-of-Product:


Y1 = A’B’ + A’B + AB
We can now create A
the logic circuit:

B X

● 1st possibility

President University Erwin Sitompul Digital Systems 4/3


Lecture Digital Systems

Example of Synthesis
We can simplify the Boolean expression and obtain different
synthesis result:
Y2 = A’B’ + A’B + AB
Y2 = A’(B’ + B) + AB (Distributive)
Y2 = A’ + AB (Complement)
Y2 = A’ + B (Elimination)

A
X
B
● 2nd possibility

President University Erwin Sitompul Digital Systems 4/4


Lecture Digital Systems

Minimum Cost Realization


 Logic circuits should be implemented by using as few as logic
gates as possible. Optimal implementation will directly affect
speed, resource, and power consumption.
 One formula of how to calculate cost is:
Cost = Σ(gates) + Σ(gate inputs)
 From previous pages,
Cost of Y1 = 6 + 11 = 17
Cost of Y2 = 2 + 3 = 5

A
A

B X X
B

President University Erwin Sitompul Digital Systems 4/5


Lecture Digital Systems

Minimum Cost Realization


 Neither SoP nor PoS guarantee a minimum cost implementation.
 In stead of these two-level forms, in some cases a multi-level form
is better.
 In practice, any circuit can be implemented only by using NAND
and NOR Gates. NAND and NOR Gates provide higher speed,
require less power, and can be built with less number of
transistors.

 Nevertheless, SoP and PoS are the basis for development of circuit
minimization methods.
 Converting from SoP and PoS to NAND and NOR circuits is
straightforward and easy.

President University Erwin Sitompul Digital Systems 4/6


Lecture Digital Systems

Minimum Cost Realization


 A formula to calculate cost may include the following factors:
 Number of gates
 Number of gate inputs
 Number of transistors
 Area of the circuit
 Routing / wiring cost
 Critical path delay

 Minimum cost realization can be done by using several methods:


 Boolean algebra simplification
 Karnaugh map
 Quine-McCluskey algorithm
 NAND/NOR equivalent

President University Erwin Sitompul Digital Systems 4/7


Lecture Digital Systems

Example: Minimum Cost Realization

President University Erwin Sitompul Digital Systems 4/8


Lecture Digital Systems

Functional Completeness
 A set of Boolean operators is called functionally complete if the set
can be used to express all possible logic functions by combining
members of the set.
 Some sets of logic operators with functional completeness are:
 AND and NOT
 OR and NOT
 NAND
 NOR

President University Erwin Sitompul Digital Systems 4/9


Lecture Digital Systems

NAND and NOR Gates

● NAND Gates

● NOR Gates

President University Erwin Sitompul Digital Systems 4/10


Lecture Digital Systems

NAND and NOR Gates: Inverter

X
X

? ● Check the truth table of


the (tied-together 2-input
NAND and NOR Gates

President University Erwin Sitompul Digital Systems 4/11


Lecture Digital Systems

NAND and NOR Gates: De Morgan’s Theorem

X
X X
Y Y
Y

(X · Y)’ = X’ + Y’
● NAND Gates

X
X X
Y Y
Y

(X + Y)’ = X’ · Y’
● NOR Gates

President University Erwin Sitompul Digital Systems 4/12


Lecture Digital Systems

Completeness of NAND Gate


 Any Boolean function can be implemented using NAND Gates only.
 NOT Gate  NAND Gate, with 2 inputs tied together.

 AND Gate  NAND Gate, followed by NOT Gate

 OR Gate  NAND Gate, preceded by NOT Gates

President University Erwin Sitompul Digital Systems 4/13


Lecture Digital Systems

Completeness of NOR Gate


 Any Boolean function can be implemented using NOR Gates only.
 NOT Gate  NOR Gate, with 2 inputs tied together.

 OR Gate  NOR Gate, followed by NOT Gate

 AND Gate  NOR Gate, preceded by NOT Gates

President University Erwin Sitompul Digital Systems 4/14


Lecture Digital Systems

Using NAND Gates to Implement an SoP


x1
x2
x3
x4
x5

x1
x2
x3
x4
x5

x1
x2
x3
x4
x5
President University Erwin Sitompul Digital Systems 4/15
Lecture Digital Systems

Using NOR Gates to Implement a PoS


x1
x2
x3
x4
x5

x1
x2
x3
x4
x5

x1
x2
x3
x4
x5
President University Erwin Sitompul Digital Systems 4/16
Lecture Digital Systems

Example: Realization with NAND Gates


For the following SoP circuit, make a circuit
realization that only uses NAND Gates.
x1
x2 F

x3

x1 x1
x2 F x2 F

x3 x3

President University Erwin Sitompul Digital Systems 4/17


Lecture Digital Systems

Example: Realization with NOR Gates


For the following PoS circuit, make a circuit
realization that only uses NOR Gates.
x1
x2 F
x3

x1 x1
x2 F x2 F
x3 x3

President University Erwin Sitompul Digital Systems 4/18


Lecture Digital Systems

Example: Realization with NAND Gates


For the following circuit, make a circuit realization
that only uses NAND Gates.
x1
x2 F
x3

x1
x2 F
x3

x1
x2 F
?
● Redo this example
for the use of NOR
Gates

x3
President University Erwin Sitompul Digital Systems 4/19
Lecture Digital Systems

Exercise: SoP with NAND Gates


Implement the following SoP function with NAND Gates only.
F = Y’Z + X’YZ
Try the variance where
a) 3-input NAND Gates are allowed
b) only 2-input NAND Gates are allowed

President University Erwin Sitompul Digital Systems 4/20


Lecture Digital Systems

Exercise: XOR with NAND and NOR Gates


Implement the XOR Gate using NAND Gates only and
NOR Gates only. Hint: Start from the truth table.

A● Be sure to know
the ways

President University Erwin Sitompul Digital Systems 4/21


Lecture Digital Systems

Homework 4
1.Implement circuit A with NAND
Gates only and NOR Gates only.

Circuit A

2.Implement circuit B with NAND


Gates only and NOR Gates
only.

Circuit B

 Deadline: Tuesday, 4 October 2016.

President University Erwin Sitompul Digital Systems 4/22

You might also like