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

QM Logic Minimization QM Logic Minimization

This document discusses the Quine-McCluskey method for logic minimization. It begins with an outline of the QM method and examples of its use. The method involves two phases: first finding prime implicants by grouping and combining minterms, then determining the minimum cover of prime implicants needed to cover the minterm set. The document provides a step-by-step example of applying the QM method to find the minimal logic expression for a given minterm set. It describes creating a coverage table to systematically determine the essential prime implicants and remaining primes needed in the minimum cover.

Uploaded by

Prasad Nagavara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

QM Logic Minimization QM Logic Minimization

This document discusses the Quine-McCluskey method for logic minimization. It begins with an outline of the QM method and examples of its use. The method involves two phases: first finding prime implicants by grouping and combining minterms, then determining the minimum cover of prime implicants needed to cover the minterm set. The document provides a step-by-step example of applying the QM method to find the minimal logic expression for a given minterm set. It describes creating a coverage table to systematically determine the essential prime implicants and remaining primes needed in the minimum cover.

Uploaded by

Prasad Nagavara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

CS221:DigitalDesign

QM Logic Minimization
QMLogicMinimization

Dr.A.Sahu
Dept of Comp. Sc. & Engg.
DeptofComp.Sc.&Engg.
IndianInstituteofTechnologyGuwahati
1

Out e
Outline
QuineMcCluskey (QM)LogicMinimization
Examples
l
WritingC/C++programforQMMethod
g /
p g

BCD Adder (Two Level)


BCDAdder(TwoLevel)

Treatas9input&5outputfunctions
G
GenerateTruthTableforeachoutputs
t T th T bl f
h t t
SolveeachfunctionusingKMAP/QMMethod
OnlyTwoLevel:NocarryPropagation
Ci
a1
b1
c1
d1
a2
b2
c2
d2

Adder
2Level

a
b
c
d
Co

QuineMcCluskey Methodfor
Minimization
KMAPmethodswaspracticalforatmost6variable
p
functions
Largernumberofvariables:needmethodthatcanbe
appliedtocomputerbasedminimization
l d
b d
QuineMcCluskey method
Forexample:

m(0,1,2,3,5,7,13,15)

QM Method
QMMethod
PhaseI:findingPis
Phase I : finding Pis
Tabularmethods:Groupingand
combining

PhaseII:CoversminimalPIs
Phase II: Covers minimal PIs

QM Method
QMMethod

Minterms thatdifferinonevariablesvalue
canbecombined.
Thuswelistourminterms sothattheyarein
groupswitheachgrouphavingthesame
numberof1s.
Sothefirststepisorderingtheminterms
accordingtotheirnumberof1s(0cubelist)
onlyminterms residinginadjacentgroups
havethechancetobecombined.):

QM Method
QMMethod

0
1
2
3
4

m ( 0 ,1, 2 , 3 , 5 , 7 ,13 ,15 )

0_Cube
0000
0001
0010
0010
0011
0101
0101
0111
1101
1101
1111

QMMethod:CombiningAdjacent
Compareminterms ofagroupwiththose
of an adjacent one to form 1 cube list
ofanadjacentonetoform1cubelist.
Whendoingthecombining,weput
checkmarkalongsidetheminterms inthe
0cube
0
cubelistthathavebeencombined.
list that have been combined.

QMMethod
0
1
2
3
4

0_Cube
0
Cube
0000
0001
0001
0010
0011
0011
0101
0111
0111
1101
1111

0
1

1_Cube
000X
000X
00X0
00X1
00X1
0X01
001X
001X
0X11
01X1
01X1
X101
X111
11X1

0,1

1,2

23
2,3

3,4

QMMethod:CombiningAdjacent
g j
Dosamecombinationofcomparing
adjacentgroupminterms
Toform2cubes,3cubesandsoon.
,

O
Onlyminterms
l i t
ofadjacentgroupshavethe
f dj
t
h
th
chanceofbeingcombined
WhichhaveanXinthesameposition.

QMMethod
0
1

b
1_Cube
000X
00X0
00X1
0X01
001X
0X11
01X1
X101
X111
X111
11X1

2_Cube
0

00XX *
00XX
0XX1 *
0XX1

1
2

X1X1 *
X1X1

QM
Q
MMethod:CoverPIs
Method: Cover PIs
PIs:termsleftwithoutcheckmarks.
AfteridentifyingourPIs,welistthem
Aft id tif i
PI
li t th
againsttheminterms neededtobecovered

m ( 0 ,1, 2 , 3 , 5 , 7 ,13 ,15 )

0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1
0 0 x x
0 x x 1
x 1 x 1
Func

QM Method : Covers
QMMethod:Covers
Tofindaminimalcover,wefirstneedtofind
essential Pis
essentialPis
Todothisweneedtofindcolumnsthatonly
have one checkmark in them the according
haveonecheckmarkinthem,theaccording
rowwillthusshowtheessentialPI.
AfteridentifyingessentialPIs,thatare
After identifying essential PIs, that are
necessarilypartofthecover,wecoverany
remainingminterms usingaminimalsetofPIs.

Inthisexample:
F=AB+BD

QMMethod:AnotherExample
C b 0
Cube0
Tabularmethodtosystematically
0000
findallprimeimplicants
(A B C D) =
(A,B,C,D)=
0100
0100
m(4,5,6,8,9,10,13)
1000
+d(0,7,15)
0101
0101
Stage1:Findallprimeimplicants
0110
1001
Step1:FillColumn1withONset
1010
andDCsetminterm indices.
0111
Groupbynumberof1's.
p y
1101
1111

QuineMcCluskey Method
Cube0
0000
0100
0100
1000
0101
Eliminatevariableandplacein 0110
nextcolumn.
1001
E.g.,0000vs.0100yields000
g,
y
0000vs.1000yields000
1010
0111
Whenusedinacombination,
markwithacheck.Ifcannotbe 1101
combined, markwithastar.
Thesearetheprimeimplicants. 1111
Repeatuntilnofurther
combinationscanbemade.
Step 2: Apply Uniting Theorem:
Step2:ApplyUnitingTheorem:
Compareelementsofgroup
w/N1'sagainstthosewith
N+1 1'ss.
N+11
Differbyonebitimplies
adjacent.

Cube 1
Cube1
0x00*
x000 *
x000
010x
01x0
100x*
10x0*
01x1
x101
011x
1x01*
x111
11x1

Cube2

Quine Mcluskey Method


Cube0
0000
0100
0100
1000
0101
Eliminatevariableandplacein 0110
nextcolumn.
1001
g,
y
E.g.,0000vs.0100yields000
0000vs.1000yields000
1010
0111
Whenusedinacombination,
markwithacheck.Ifcannotbe 1101
combined, markwithastar.
Thesearetheprimeimplicants. 1111
Step 2: Apply Uniting Theorem:
Step2:ApplyUnitingTheorem:
Compareelementsofgroup
w/N1'sagainstthosewith
N+1 1'ss.
N+11
Differbyonebitimplies
adjacent.

Repeatuntilnofurthercombinations
canbemade.

Cube 1
Cube1
0x00*
x000 *
x000
010x
01x0
100x*
10x0*
01x1
x101
011x
1x01*
x111
11x1

Cube2
01xx*
x1x1 *
x1x1

FindingtheMinimumCover
Wehavesofarfoundalltheprime
implicants
2nd stepoftheQMprocedureistofind
p
p
thesmallestsetofprimeimplicants to
cover the complete on set of the
coverthecompleteonsetofthe
function

FindingtheMinimumCover
Thisisaccomplishedthroughtheprimeimplicant
chart
Columnsarelabeledwiththeminterm indices
of the onset
oftheonset
Rowsarelabeledwiththeminterms covered
by a given prime implicant
byagivenprimeimplicant
Exampleaprimeimplicant (11)becomes
minterms
i t
0101 0111 1101 1111 hi h
0101,0111,1101,1111,whichare
indicesofminterms m5,m7,m13,m15

CoverageTable/Chart
0,4(000)

4
X

0 8(000)
0,8(000)

8,9(100)

8,10(100)
(
)

9,13(101)
4,5,6,7(01)
5,7,13,15(11)

X
X

Note: Dont include DCs in


g table; theyy dont
coverage
have covered by the final
logic expression!

13

X
X
X

10

X
X
rows=primeimplicants
columns=ONsetelements
place an "X"
placean
X ifON
if ONset
setelementis
element is
coveredbytheprimeimplicant

CoverageTable/Chart
0,4(000)

4
X

0 8(000)
0,8(000)

8,9(100)

8,10(100)
(
)

9,13(101)
4,5,6,7(01)

5,7,13,15(11)
rows=primeimplicants
columns =ON
columns
ONset
setelements
elements
placean"X"ifONsetelementis
coveredbytheprimeimplicant

X
X

13

X
X
X

10

X
X

IfcolumnhasasingleX,thanthe
implicant associatedwiththerow
associated with the row
isessential.Itmustappearin
minimumcover

CoverageTable/Chart:Eliminate
0,4(000)

4
X

0 8(000)
0,8(000)

8,9(100)

8,10(100)
(
)

9,13(101)
4,5,6,7(01)

5,7,13,15(11)
rows=primeimplicants
columns=ONsetelements
placean"X"ifONsetelementis
coveredbytheprimeimplicant

IfcolumnhasasingleX,thanthe
If
l
h
i l X th th
implicant associatedwiththerow
isessential.Itmustappearin
minimumcover

X
X

13

X
X
X

10

X
X

Eliminateallcolumnscoveredby
essentialprimes
i l i

CoverageTable/Chart:Eliminate
0,4(000)

4
X

0 8(000)
0,8(000)

8,9(100)

8,10(100)
(
)

9,13(101)
4,5,6,7(01)

5,7,13,15(11)

rows = prime implicants


columns = ON-set elements
place an "X" if ON-set element is
covered by the prime implicant

X
X

13

X
X
X

10

X
X

Find minimum set of rows that


cover the remainingg columns
Eliminate all columns covered by
essential primes

CoverageTable/Chart:Eliminate
0,4(000)

4
X

0 8(000)
0,8(000)

8,9(100)

8,10(100)
(
)

9,13(101)
4,5,6,7(01)
5,7,13,15(11)

13

X
X
X

10

If all are covered:


Write the Implicants

F= ABD + ACD + AB

Thanks

24

You might also like