University of Wisconsin - Madison
ECE/Comp Sci 352 Digital Systems Fundamentals Charles R. Kime
Section 1 – Fall 2001
Logic and Computer Design Fundamentals
Chapter 2 – Combinational Logic Circuits – Part 6 Charles Kime & Thomas Kaminski © 2001 Prentice Hall, Inc
Systematic Simplification Example Find the least literal cost solution considering both SOP
and POS for F( W , X , Y , Z ) = Σ m(1,5,7, 8,13)
+ Σd ( 2,6,9,10 )
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 2
1
Tabular Method for PI Generation Alternative method for simplifying a Boolean equation Improved by Quine and McCluskey and known as the
Q-M Method. The Tabular Method: 1. Starts with a table of minterms. 2. Compares each minterm with every other minterm in the list to find minterms which differ in exactly one variable. 3. Constructs a new list with terms of one fewer variables, keeping track of which minterms were covered. 4. Compares every element in the new list with each other to find terms that differ in one more variable. 5. Repeats Steps 3 and 4 until done.
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 3
An Example: F(x,y,z)=∑ m(2,3,6,7) Step 1: Create a table of minterms. Column (a) xyz
Column (b) xyz
Column(c) xyz
010 m2 011 m3 110 m6 111 m7
Step 2: Compare each minterm with all others, i.e.,
compare each minterm with those following it in the list. • 010: (011 ⇒ 01-)*, (110 ⇒-10), (111⇒Ø) (110 ⇒Ø), (111⇒-11) • 011: (111 ⇒ 11-) • 110: • * - means literal missing. Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 4
2
Results - Step 2 Column (a) xyz
Column (b) xyz
010 m2
(01 - ) m2,m3
011 m3
( - 10) m2,m6
110 m6
( - 11) m3,m7
111 m7
(11 - ) m6,m7
Column(c) xyz
Note that there are terms which are duplicated,
- that is, they appear more than once. Duplicate terms:
• •
have the same pattern of bits (including the -), and came from the same minterms.
Delete all but one of each duplicate term.
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 5
Step 3 Column (a)
Column (b)
010 m2
(01 - ) m2,m3
011 m3
( - 10) m2,m6
110 m6
( - 11) m3,m7
111 m7
(11 - ) m6,m7
xyz
xyz
Column(c) xyz
Step 3: Make a new list by comparing items in Column (b)
• 01-: • -10: • -11: • 11-:
(-10 ⇒ Ø), (-11 ⇒ Ø ), (11- ⇒ -1-) (01- ⇒ Ø), (-11 ⇒-1-), (11- ⇒ Ø ) (01- ⇒-1-), (-10 ⇒-1-), (11- ⇒ Ø ) (01- ⇒-1-), (-10 ⇒ Ø ), (-11 ⇒ Ø )
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 6
3
Results - Step 3 Column (a) xyz 010 011 110 111
m2 m3 m6 m7
Column (b) Column(c) xyz (01-) m2,m3 (-10) m2,m6 (-11) m3,m7 (11-) m6,m7
xyz (-1-) m2,m3,m6,m7 (-1-) m2,m6,m3,m7
Obviously, the Column (c) can be simplified by
eliminating duplicates -- this leads to only one entry: (-1-) from m2,m3,m6,m7 This corresponds to the Prime Implicant "y". The algorithm terminates at this point. Since this is the only PI and it covers all minterms, the result is: F(x,y,z) =y Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 7
Computational Complexity Issues The table method is complex. For "n" minterms, there
are on the order of n2 comparisons required. The Q-M Method simplifies the work by sorting the minterms into terms that can compare favorably. Terms that have no chance of combining are not even tried. It also adds some bookkeeping to simplify PI identification. Grouping: Use the number of 1s in the minterm to group the minterms. Preserve groups derived from this grouping in adjacent columns. Bookkeeping: Use a check mark (√) next to terms that have been combined. Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 8
4
Q-M on F(x,y,z)=∑m(2,3,6,7) Initial Group
Column (a) Column (b) Column(c) xyz xyz xyz 010 m2 One 1 ---------------Two 1's 011 m3 110 m6 ---------------Three 1's 111 m7
Step 2: Compare terms from adjacent groups.
• Group 1 => Group 2 • 010: (011 ⇒ 01-), (110 ⇒-10) • Group 2 => Group 3 • 011: (111⇒-11) • 110: (111 ⇒ 11-) Logic and Computer Design Fundamentals
Chapter 2-Part 6 9
© 2001 Prentice Hall, Inc
The Result of Step 3 Initial One 1
Column (a) 010 m2√ ---------------Two 1's 011 m3√ 110 m6√ ---------------Three 1's 111 m7√
Column (b) Column(c) (01-) m2,m3 (-10) m2,m6 ----------------(-11) m3,m7 (11-) m6,m7
Step 4: Repeat on Column (b)
• Group (1-2) => Group (2-3) • (01-): (-11⇒ Ø), (11- ⇒ -1-) • (-10): (-11 ⇒-1-), (11-⇒Ø) Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 10
5
Result of Step 4 Initial Group One 1
Column (a) xyz 010 m2√ --------------Two 1's 011 m3√ 110 m6√ --------------Three 1's 111 m7√
Column (b) xyz (01- ) m2,m3 √ (-10) m2,m6√ ----------------(-11) m3,m7√ (11-) m6,m7√
Column(c) xyz ( -1-)m2,m3,m6,m7 (-1-)m2,m3,m6,m7
Note that the resulting terms are duplicates and are
unchecked at termination. Final Result: F(x,y,z) = y In general, when no new terms can be generated, the set of all unchecked terms give the result. Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 11
Tabular Method: Cover Selection 1.
2. 3. 4. 5. 6. 7.
Construct a table with: a) Columns for each minterm, and b) Rows for each Prime Implicant. Select Essential Prime Implicants and check off each covered minterm. Delete Less Than Prime Implicants. Select Secondary Essential Prime Implicants and check off each covered minterm. Repeat 3 and 4 until a cover is generated. If cycles exist, pick a PI and generate a cover and then delete that same PI and generate an alternate cover. Select the minimum literal cover.
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 12
6
Tabular Method Cover Example Function g(w,x,y,z): y
w
10
11
13
12
4
15
7
6
113 115
114
12
18
9
11
x
110
z
Step 1:
Enter table:
1 1 1 1 Type 0 3 4 5
PIs
0 1 2 3 5 8
-0-0 00-0-01 -101 11-1 1111-10
x x x x x x x x x x x x x x
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
x x x x Chapter 2-Part 6 13
Select Essential Prime Implicants Step 2: Select Essential PI and check them off
along with minterms covered. PIs
0 1 2 3 5 8
√
-0-0
x
√
00--
x x x x
0-01
x x
-101
1 1 1 1 0 3 4 5
Essential
x x
Essential x x
x
11-1
x
111-
x x x
1-10
x √√ √ √
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Type
x
√ √ Chapter 2-Part 6 14
7
Less Than Prime Implicants Step 3: Find and delete less than PIs.
• 0-01 ≤ -101 • 1-10≤ 111-
PIs
0 1 2 3 5 8
√
-0-0
x
√
00--
x x x x
x
x x
x
0-01
1 1 1 1 0 3 4 5
Essential Essential
x
Less Than
x
-101
Type
x x
11-1
x x x
1111-10
x √√ √ √
x
√ √
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 15
Secondary Essential PIs Select secondary essential PIs and check
them off along with minterms covered. PIs
0 1 2 3 5 8
√
-0-0
x
√
00--
x x x x
0-01 √
-101
x x
1 1 1 1 0 3 4 5
x x x
Less Than
x
x
Second E.
x
x Redundant x x Second E.
1111-10
Essential Essential
11-1 √
Type
x
x
√ √ √ √ √ √ √ √ √ √ Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 16
8
Results for g Note that after the secondary essentials
have been added, PI 11-1 (w x z) is not needed to cover minterms, so it is redundant. F( w , x , y , z ) = x z + w x + x y z + w x y
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 17
Cyclic Structures Let F ( x , y , z ) = Σm( 0,1, 2,5,6,7 ) Enter table: 1 PIs
0 1 2 5 6 7 Type
00-01
x x x
1-1 11-10 0-0
x
x
y 0 4
1 1
1
3
1
5
7
1 1
2 6
z
x x x x
x x x x
Note that all minterms are covered more than
once; thus no essential PIs. Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 18
9
Cyclic Structure: Pick PI Step 1: Pick a PI and mark off the
minterms covered. √
PIs
0 1 2 5 6 7 Type
00-01 1-1
x x x
11-10 0-0
(Picked) x x
x x x
x
x x
x
√ √ Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 19
Less than PIs for picked PI Step 2: Eliminate less than PIs. √
PIs
0 1 2 5 6 7 Type
00-01 1-1 11-10 0-0
x x x
(Picked) x x x
x
x x x x
x
√ √
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 20
10
Secondary essential PIs for picked PI Find secondary essential PIs. √ √ √
PIs
0 1 2 5 6 7 Type
00-01 1-1 11-10 0-0
x x x
x
(Picked) x Less Than x x Secondary E. x x Redundant x x Secondary E. x Less Than
√ √ √ √ √ √
Result: F( x, y , z ) = x y + x z + y z Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 21
Start Over: Deleting Selected PI Step 1': Delete the PI picked. Step 2': Select essential PIs. Step 3': Find and delete less than PIs.
√
√
PIs 00-01 -1 11-10 0-0
0 1 2 5 6 7 Type
x x x
x
x x x x
(Deleted) Essential x x x x Essential
√√ √ √ Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 22
11
Finish Example Step 4': Select secondary essential PIs.
√ √ √
PIs 00-01 -1 11-10 0-0
0 1 2 5 6 7 Type
x x x
x
x x x x
(Deleted) Essential x x x Secondary E. x Essential
√√ √ √ √ √
Result: F ( x , y , z ) = y z + x y + x z Both results are minimum literal. Use either. Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 23
An Example with Don’t Cares F( A, B, C, D ) = Σm( 2,4,5,13,14,15)
+ Σm( 0,1,6,10)
Using K-Map to get PIs:
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 24
12
An Example with Don’t Cares Using Tabular Selection: PIs
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
2
4 5
1 1 1 Type 3 4 5
Chapter 2-Part 6 25
An Example with Don’t Cares Result:
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 26
13
Minimum POS We can use the minimization techniques
learned so far to implement a minimum literal, standard POS form: • Simplify F using SOP methods. • Complement the result for F . On a K-map, note that F corresponds to the 0s.
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 27
Minimum POS Example Given g(w,x,y,z), find PIs for 0s.
y
10 11 13 12 04 15 07 06 w
012 113 115 114
x
1 8 0 9 011 110 z
g = xyz + wxy + wxz Complementing: g = ( x + y + z )( w + x + y )( w + x + z )
Selecting PIs:
Logic and Computer Design Fundamentals © 2001 Prentice Hall, Inc
Chapter 2-Part 6 28
14