Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to...

45
Gate-Level Minimization Mano & Ciletti Chapter 3 By Suleyman TOSUN Ankara University

Transcript of Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to...

Page 1: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Gate-Level Minimization

Mano & Ciletti

Chapter 3 By Suleyman TOSUN Ankara University

Page 2: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Outline

Intro to Gate-Level Minimization

The Map Method

2-3-4-5 variable map methods

Product-of-Sums Method

Don’t care Conditions

NAND and NOR Implementations

Page 3: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Gate-Level Minimization

Finding an optimal gate-level implementation

of Boolean functions.

Difficult to perform manually.

Can use computer-based logic synthesis tool

Exp: espresso logic minimization software

Karnough Map (K-map) can be used for manual

design of digital circuits.

Page 4: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

The Map Method

The truth table representation of a function is

unique.

But, not the algebraic expression

Several versions of an algebraic expression exist.

Difficult to minimize algebraic functions manually.

The map method is a simple proceure to

minimize Boolean functions.

Pictorial form of a truth table.

Called Karnough Map or K-Map.

Page 5: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Two-Variable Map

Four Minterms

Two variables

Four squares for four minterms

Figure b shows the relationship between the squares and the variables x and y.

Page 6: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Two-Variable Map (Cont.)

May only be useful to represent 16 Boolean

functions.

Exp: If m1=m2=m3=1 then

m1+m2+m3=x’y+xy’+xy=x+y (OR function)

Page 7: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Three-Variable Map

There are 8 minterms for 3 variables.

So, there are 8 squares.

Minterms are arranged not in a binary sequence, but in sequence similar to the Gray code.

Page 8: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Three-Variable Map (Cont.)

The square for square m5 corresponds to

row 1 and column 01 (101).

Another look to m5 is m5=xy’z.

When variables are 0, they are primed (ex:

x’). Otherwise not primed (x).

Page 9: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Three-Variable Map (Cont.)

Two adjacent squares differs one variable (one primed

other is not).

So, they can be minimized

Ex: m5+m7=xy’z+xyz=xz(y’+y)=xz

So, try to cover as many adjacent squares as

possible by the orders of two.

1,2,4,8… squares that has the logical value1.

Page 10: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 1

Simplfy the Boolean function

F(x,y,z)=Σ(2,3,4,5)

F(x,y,z)=x’y+xy’

Page 11: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Adjacent squares

Some adjacent squares don’t touch each other. m0 is adjacent to m2 and m4 is adjacent to m6.

m0+m2=x’y’z’+x’yz’=x’z’(y’+y)=x’z’

m4+m6=xy’z’+xyz’=xz’(y’+y)=xz’

Page 12: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 2

Simplfy the Boolean function

F(x,y,z)=Σ(3,4,6,7)

F(x,y,z)=yz+xz’

Page 13: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 3

Simplfy the Boolean function

F(x,y,z)=Σ(0,2,4,5,6)

F(x,y,z)=z’+xy’

Page 14: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 4

F=A’C+A’B+AB’C+BC

Express F as a sum of minterms.

F(A,B,C)=Σ(1,2,3,5,7)

Find the minimal sum-of-products expression

F=C+A’B

Page 15: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Four-Variable Map

16 minterms (and squares) for 4 variables.

Page 16: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 5

Simplify F(w,x,y,z)=Σ(0,1,2,4,5,6,8,9,12,13,14)

F(w,x,y,z)=y’+w’z’+xz’

Page 17: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 6

Simplfy F=A’B’C’+B’CD’+A’BCD’+AB’C’

F=B’D’+B’C’+A’CD”

Page 18: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Prime Implicant

A product term obtained by combining the

max. possible number of adjacent squares.

If a minterm is covered by only one prime

implicant, that prime implicant is said to be

essential.

Page 19: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example

F(A,B,C,D)=Σ(0,2,3,5,7,8,9,10,11,13,15)

Page 20: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example

F=BD+B’D’+CD+AD=BD+B’D’+CD+AB’

=BD+B’D’+B’C+AD=BD+B’D’+B’C+AB’

Page 21: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Five-Variable Map

Not simple, is not usually used. 5 variables,

32 squares.

Page 22: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 7 Simplfy

F(A,B,C,D,E)=Σ(0,2,4,6,9,13,21,23,25,29,31)

F=A’B’E’+BD’E’+ACE

Page 23: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Product-of-Sums Simplification

Mark the empty squares by 0’s.

Combine them (as we did for sum-of-

products)

We obtain F’ (complement of the function)

Take the complement of F’ ((F’)’) to obtain F.

Page 24: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 8

Simplfy F(A,B,C,D)=Σ(0,1,2,5,8,9,10)

F=B’D’+B’C’+A’C’D

F’=AB+CD+BD’ => F=(A’+B’)(C’+D’)(B’+D)

Page 25: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 8 gate impl.

Two different implementations of the same

function.

Page 26: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Don’t Care Conditions

In practice’ some combinations are not specified as

1’s or 0’s.

Four bit binary codes has six unused combinations.

Functions having unspecified outputs are called

incompletely specified functions.

We don’t care the unspecified minterms

These minterms are called don’t-care conditions.

They can be used for minimization.

They are indicated as X’s in the map.

They can be assumed as 1’s or 0’s to have best

simplification.

Page 27: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 9

Simplify F(w,x,y,z)=Σ(1,3,7,11,15) having

don’t care conditions d(w,x,y,z)= Σ(0,2,5)

Page 28: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

NAND and NOR Implementation

Generally used for circuit design

Easier to fabricate.

Basic gates

Other functions can be generated from them.

Rules have been developed to convert functions

to NAND and NOR only implementations.

Page 29: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

NAND Circuits

NAND gate is universal

Any digital system can be implemented with it.

AND, OR and NOT can be implemented with

NANDs.

Page 30: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Two graphic symbols of NAND

Page 31: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Two-Level Implementation

Have the function in sum-of-product form.

Put bubbles (inverters) to have two different

representations of NAND gate

Either AND-invert or Invert-OR

Page 32: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example: F=AB+CD

Page 33: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example 10 Implement F(x,y,z)=Σ(1,2,3,4,5,7) with only

NAND gates.

Page 34: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Multilevel NAND Circuits

F=A(CD+B)+BC’

Page 35: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

NOR Implementation

Dual of NAND operation

Page 36: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example: F=(A+B)(C+D)E

Page 37: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Example: F=(AB’+A’B)(C+D’)

Page 38: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Exclusive-Or (XOR) Function

XOR

1 if only x is one or if only y is 1

XNOR

1 if both inputs are 1 or both inputs are 0

Some identities of XOR

yxyxyx

yxxyyx )(

xx 0

'1 xx

0 xx

1' xx

)'('' yxyxyx

Page 39: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

XOR Implementations

Page 40: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Odd Funct’on

N variable XOR function is odd function

defined as

The logical sum of the 2n/2 minterms whose

binary numerical values have an odd number of

1’s. If n=3, 4 minterms have odd number of 1’s.

Page 41: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Logic Diagram of odd and even functions

Page 42: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Parity Generation

A parity bit is an extra bit included with a

binary message

If number of 1’s is odd, parity bit is 1; else 0.

The circuit that generates the parity bit in the

transmitter is called parity generator.

Parity bit can be generated using XOR

function.

Page 43: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

3-Bit Parity Generator

Page 44: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

Parity Checker

Bits are transmitted to the destination with

parity.

The circuit that checks the parity in the

receiver is called a parity checker.

Parity checker can be implmeneted with XOR

gates.

Page 45: Gate-Level Minimizationcomp.eng.ankara.edu.tr/files/2015/11/chapter3.pdf · Outline Intro to Gate-Level Minimization The Map Method 2-3-4-5 variable map methods Product-of-Sums Method

3-Bit Parity Checker