Docsity

Logic Minimization-Programming and Computer Logic Design-Lecture Slides, Slides of Digital Logic Design and Programming

Partial preview of the text

Download Logic Minimization-Programming and Computer Logic Design-Lecture Slides and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Karnaugh Maps - Introduction

„^

2-Level Logic implementation using SOP or POS isnot the most economical in terms of #gates &#inputs

„^

A Karnaugh map is a graphical representation of atruth table^

The map contains one cell for each possible minterm

Adjacent cells differ in only one literal; i.e. x (or x’) Function is plotted by placing 1 in cells corresponding tominterms Put 0 in rest of the cells

docsity.com

K Map with 2 Variables

m

1 m

m

m

y 0 1

x

m

x 0 0 1 1

m

y 0 1 0

F m0 m

„^

F =f(x,y) „^ Example, F1 = x’y

y 0 1

x

docsity.com

K Map with 3 Variables „

3 Variable, F = f(x,y,z);

„^

Given F3 =

^

Minimize the function using K map

Function minimization

^

Find maximum size groups that

cover all 1s

in the map

(Comment – a group should not be a subset of other group) 4 cell group

Æ

2 literals can be removed

2 cell group

Æ

1 literal can be removed

„^

Guidelines for logic synthesis (SOP)

^

Fewer groups

Æ

fewer AND gates, and fewer inputs to the

OR gate

^

Fewer literals (larger group)

Æ

fewer inputs to an AND gate

„^

Synthesis Objective: Fewest # of gates and # of inputs

docsity.com

K Map with 4 Variables „

4 Variable, F = f(w,x,y,z)

„^

Given, F4 =

^

represent it on the map

^

Minimize the logic

„^

Clues

^

Make all possible groups

^

Do we need “the group of 4”?

F4 = w’xy’ +wxy +w’yz +wy’z

m0 m

00 m4 m

yz 00 01

wx

m1 m5 m13 m

m^

m

m^

m

m

m

m

m

yz 00 01 wx

0 docsity.com

Product of Sum Expression „

Let F be the function

Æ

F’ =

(all minterms not in F)

„^

F =

(all minterms not in F)’

(de Morgan’s theorem)

„^

Therefore, one cam obtain POS expression by1.^

Group all 0s on K map

2.^

Use de Morgan’s theorem to obtain POS expression

F6 = x’z’ +x’y’ + w’y’z (SOP) = (w’ +x’)(y’ +z’)(x’ +z) (POS) „^

One is often simpler than the other

Æ

Check both

yz 00 01 wx

yz 00 01 wx

docsity.com

Plotting Product of Sum Expression

„^

Given, F7 = (w +x)(x +y’ +z)(y +z)F7’^

= [(w +x)(x +y’ +z)(y +z)]’= (w +x)’ +(x +y’ +z)’ +(y +z)’= w’x’ +x’yz’ +y’z’

„^

F7’ is plotted by putting 0s inappropriate cells

„^

Can F7’ be simplified further? F7’^

= w’x’ +x’z’ +y’z’

F

= (w +x)(x +z)(y +z)

yz 00 01 wx

0 docsity.com

Don’t Care - Plotting „

Don’t care are plotted as X in the K map

„^

SOP expression

Æ

Treat X as 1 if it allows a larger group

„^

POS expression

Æ

Treat x as 0 if it allows a larger group

„^

F8_

= wz +xyz’ +x’yz (SOP)

F8’_

= xz +w’y’ +x’z’

{F’ =

(all minterms not in F)}

F8_

= (x’ +z’)(w +y)(x +z)

de Morgan’s theorem

Is F8_1 = F8_2??

00 0 X

yz 00 01 wx

0 0 X 1

X^

X

X^

X

00 0 X

yz 00 01 wx

0 0 X 1

X^

X

X^

X docsity.com

Simplest 2-Level Expression „

Example, F(w,x,y,z) =

(0,1,2,5,6,7,9,14) +d(13)

^

Determine essential and prime implicants

yz 00 01 wx

11 X 1

yz 00 01

wx

11 X 1

Essential prime implicants

Prime implicants

docsity.com

Tabulation (Quine-McCluskey) Method

„^

The map method of simplification is convenient if # ofvariables

≤^

^

Tabulation method is preferred for function with large # of variables

„^

For F(w,x,y,z) consider adjacent mintermslet a = m4 +m

= w’xy’z’ + w’xy’z = w’xy’

or^

Similarly, b =m12 +m

= wxy’z’ + wxy’z = wxy’ = 110-

„^

Let c = a +b = m4 +m5 +m12 +m13w’xy’ +wxy’ = xy’ = -10-

„^

Adjacent terms differ by a single bit in their representation

„^

Tabulation method consists of grouping of minterms andsystematically checking for single bit differences

docsity.com

Tabulation (Quine-McCluskey) Method

„^

Example, F(w,x,y,z) =

(0,3,4,6,7,8,10,11,15) +d(5,9)

^

Place minterms in different Sections according to # of 1’s in theirbinary representation

^

Each member of each Section is compared with each member ofSections below; all reduction are recorded in next column

^

Mark terms that combine

^

All unmarked terms are prime implicants

docsity.com

NAND & NOR Implementation

„^

In digital logic families NAND & NOR implementationsare cheaper compared to AND & OR implementations

^

Hence, NAND & NOR are preferred

„^

NAND and NOR are universal gates

^

Can mimic any logic gate

^

Example, NAND gate can implement:NOT

Æ

short inputs

AND

Æ

{(xy)’}’

OR

Æ

(x’y’)’ = x +y

„^

Similarly for NOR gate, one can show its universality

docsity.com

NAND – 2-level Implementation

„^

Can implement any arbitrary logicExample, F = AB + CD

docsity.com

NAND – 2-level Implementation Procedure

1.^

Simplify the function and express it in SOP form

2.^

Draw a NAND gate for each product term

3.^

Draw a single gate using AND-invert or invert-ORsymbol for the sum term

4.^

A term with single literal, complement if needed „^

Multi-level NAND Circuits

1.^

Convert all AND gates to NAND gates

2.^

Convert all OR gates to NAND gates with invert-ORsymbols

3.^

Balance all bubbles, insert an inverter if needed

docsity.com

NOR – Implementation

„^

NOR gate is a dual of NAND

^

Same rules and procedures

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

docsity.com