Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

CS\EE2101 Digital Systems :

Quine-McCluskey Algorithm
By
Vikramkumar Pudi

Introduction
Text Books
1. DIGITAL DESIGN: WITH AN INTRODUCTION TO THE VERILOG HDL,
VHDL, AND SYSTEMVERILOG by M.MORRIS MANO and MICHAEL D.
CILETTI, 6th Edition
2. FUNDAMENTALS OF LOGIC DESIGN by CHARLES H.ROTH, 7th
Edition.

Digital Systems
• Interconnection of Digital Modules

Lecture - 2 CS\EE2101 Digital Systems Introduction


Quine-McCluskey Method

• The general method for simplification of Boolean expression

3
K-Map Pros and Cons

• K-Map is systemic

• Require the ability to identify and visualize the prime implicants in order to
cover all minterms

• But effective only up to 5-6 input variables!

4
Quine-McCluskey Algorithm

• Tabular Method
– Compute all prime implicants
– Find a minimum expression for Boolean functions

• No visualization of prime implicants

• Can be programmed and implemented in a computer

5
QM Method Example

Step 1 : Divide all the minterms(and don’t cares) of a function into groups

For For
Minterms : Don’t Cares :

6
QM Method Example
Step 1 : Divide all the minterms(and don’t cares) of a function into groups

How will you group?

Group based on number of


Ones present in Minterm

7
QM Method Example
Step 2 : Merge minterms from adjacent groups to form a new implicant table

How did you get


this Table?

Group based on one-bit change


present in Minterm.
ഥ+𝑿=𝟏
To use 𝑿

8
QM Method Example
Step 3 : Repeat Step-2 until no more merging is possible

How did you get


this Table?
9
QM Method Example
Step 3 : Repeat Step-2 until no more merging is possible

No more Merging is possible

10
QM Method Example
Step 4 : Put all prime implicants in a cover table (don’t cares excluded)

11
QM Method Example
Step 4 : Identify essential minterms, and hence essential prime implicants
Step 5 : Add prime implicants to the minimum expression of F until all
minterms of F are covered)

12
QM Method Example (Essential prime implicant)
If a minterm is covered only by one prime implicant,that prime implicant is
called essential prime

13
QM Method Example (Essential prime implicant)
If a minterm is covered only by one prime implicant,that prime implicant is
called essential prime

1
1
1
1
2
1
1
3

14
QM Method Example

15
Finding Prime Implicants using QM method

CD CD
AB 00 01 11 10 00 01 11 10
AB
00 1 1 1 00 1

01 1 1 01 1 1

11 1 1 11 1 1

1 1 1 1 1
10 10

16
Finding Prime Implicants using QM method

CD
AB 00 01 11 10

00 1 1 1

01 1 1
𝒇 = ෍ 𝒎(𝟎, 𝟐, 𝟑, 𝟒, 𝟓, 𝟖, 𝟏𝟎, 𝟏𝟏, 𝟏𝟑, 𝟏𝟓)
11 1 1

1 1 1
10

17
Finding Prime Implicants using QM method

𝒇(𝒂, 𝒃, 𝒄, 𝒅) = ෍ 𝒎(𝟎, 𝟐, 𝟑, 𝟒, 𝟓, 𝟖, 𝟏𝟎, 𝟏𝟏, 𝟏𝟑, 𝟏𝟓)

Groups Minterm a b c d Merge Mark

G0 0 0 0 0 0

2 0 0 1 0

G1 4 0 1 0 0

8 1 0 0 0

3 0 0 1 1

G2 5 0 1 0 1

10 1 0 1 0

11 1 0 1 1
G3
13 1 1 0 1

G4 15 1 1 1 1
18
Finding Prime Implicants using QM method
𝒇(𝒂, 𝒃, 𝒄, 𝒅) = ෍ 𝒎(𝟎, 𝟐, 𝟑, 𝟒, 𝟓, 𝟖, 𝟏𝟎, 𝟏𝟏, 𝟏𝟑, 𝟏𝟓)
Groups Minterm a b c d Merge Mark

G0_1 0,2 0 0 x 0

Groups Minterm a b c d Merge Mark 0,4 0 x 0 0

G0 0 0 0 0 0 0,8 x 0 0 0

2 0 0 1 0 2,3 0 0 1 x

G1 4 0 1 0 0 2,10 x 0 1 0

8 1 0 0 0 G2_1 4, 5 0 1 0 x

3 0 0 1 1 8,10 1 0 x 0

G2 5 0 1 0 1 3,11 x 0 1 1
G3_1
10 1 0 1 0 5,13 x 1 0 1

11 1 0 1 1 10,11 1 0 1 x
G3
13 1 1 0 1 G4_1 11,15 1 x 1 1

G4 15 1 1 1 1 13,15 1 1 x 1
19
Finding Prime Implicants using QM method
𝒇(𝒂, 𝒃, 𝒄, 𝒅) = ෍ 𝒎(𝟎, 𝟐, 𝟑, 𝟒, 𝟓, 𝟖, 𝟏𝟎, 𝟏𝟏, 𝟏𝟑, 𝟏𝟓)
Groups Minterm a b c d Merge Mark Groups Minterm a b c d Merge Mark

G0_1 0,2 0 0 x 0 G0_2 0,2,8,10 x 0 x 0

0,4 0 x 0 0 0,8,2,10 x 0 x 0

0,8 x 0 0 0

2,3 0 0 1 x 2,3,10,11 x 0 1 x

2,10 x 0 1 0 2,10,3,11 x 0 1 x

G2_1 4, 5 0 1 0 x G2_2
8,10 1 0 x 0

3,11 x 0 1 1
G3_1
5,13 x 1 0 1

10,11 1 0 1 x

G4_1 11,15 1 x 1 1
20
13,15 1 1 x 1
Finding Prime Implicants using QM method
𝒇(𝒂, 𝒃, 𝒄, 𝒅) = ෍ 𝒎(𝟎, 𝟐, 𝟑, 𝟒, 𝟓, 𝟖, 𝟏𝟎, 𝟏𝟏, 𝟏𝟑, 𝟏𝟓)
Groups Minterm a b c d Merge Mark Groups Minterm a b c d Merge Mark

G0_1 0,2 0 0 x 0 G0_2 0,2,8,10 x 0 x 0

0,4 0 x 0 0 0,8,2,10 x 0 x 0

0,8 x 0 0 0

2,3 0 0 1 x 2,3,10,11 x 0 1 x

2,10 x 0 1 0 2,10,3,11 x 0 1 x

G2_1 4, 5 0 1 0 x G2_2
8,10 1 0 x 0

3,11 x 0 1 1
G3_1
5,13 x 1 0 1

10,11 1 0 1 x

G4_1 11,15 1 x 1 1
21
13,15 1 1 x 1
Minimal Sum
A sum of products (SOP) expression such that no SOP expression for Y has fewer product terms
and any SOP expression with the same number of product terms has at least as many literals.
This is what we are trying to produce through the use of Karnaugh maps.

Implicant
A normal product term that implies Y

Prime Implicant
An implicant of Y such that if any variable is removed from the implicant, the resulting term does not
imply Y.

Example: Y = AB + ABC + BC
Prime Implicants: AB, BC
Not a prime implicant: ABC

22
PI Theorem
A minimal sum is a sum of prime implicants.

Distinguished 1-Cell
An input combination that is covered by 1 prime implicant. In terms of Karnaugh maps, distinguished
cells are 1's that are circled by only 1 prime implicant.

Essential Prime Implicant


A prime implicant that that includes one or more distinguished one cells. Essential prime implicants are
important because a minimal sum contains all essential prime implicants.

23
Essential Prime Implicants

Prime Implicants 5

Distinguished 1-Cells 2

Essential Prime Implicants 2

Minimal Sums: 1

24
Essential Prime Implicants

CD CD
00 01 11 10 AB 00 01 11 10
AB Prime Implicants
00 1 1 1 00 1
Distinguished 1-Cells
1 1 01 1 1
01
Essential Prime Implicants
1 1 11 1 1
11
Minimal Sums:
1 1 1 1 1
10 10

25
Essential Prime Implicants

Prime Implicants 7

Distinguished 1-Cells 2

Essential Prime Implicants 2

Minimal Sums: 1

26
Essential Prime Implicants

Prime Implicants 6

Distinguished 1-Cells 2

Essential Prime Implicants 2

Minimal Sums: 3

27

You might also like