0% found this document useful (0 votes)
4 views32 pages

03 Clii

The document discusses combinational logic, focusing on Karnaugh maps (K-maps) for simplifying boolean functions through various implementations such as Sum of Minterms, Sum of Products, Product of Maxterms, and Product of Sums. It explains how to use K-maps for visual simplification and introduces concepts like prime implicants and essential prime implicants, along with strategies for optimal expression selection. The document also touches on handling 'don't care' conditions in K-maps to further simplify functions.

Uploaded by

baglethealmighty
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)
4 views32 pages

03 Clii

The document discusses combinational logic, focusing on Karnaugh maps (K-maps) for simplifying boolean functions through various implementations such as Sum of Minterms, Sum of Products, Product of Maxterms, and Product of Sums. It explains how to use K-maps for visual simplification and introduces concepts like prime implicants and essential prime implicants, along with strategies for optimal expression selection. The document also touches on handling 'don't care' conditions in K-maps to further simplify functions.

Uploaded by

baglethealmighty
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/ 32

Combinational Logic

Part 2:

Karnaugh maps (quick)


Sum of Minterms Implementation

• OR all of the minterms of truth


table for which the function
value is 1

F = m 0 + m2 + m5 + m7
F = X’Y’Z’ + X’YZ’+
XY’Z + XYZ

2
Sum of Products Implementation

• Simplifying sum-of-minterms can


yield a sum of products
• Difference is that each term need
not have all variables
F = Y’ + X’YZ’ + XY
• Resulting gates 
• ANDs and one OR

3
Product of Maxterms Implementation

• Can express F as AND of Maxterms for


all rows that should evaluate to 0
F  M1  M 3  M 4  M 6
or
F  ( X  Y  Z )( X  Y  Z )
( X  Y  Z )( X  Y  Z )
This makes one Maxterm fail each time F should be 0
4
Product of Sums Implementation

• ORs followed by AND

F  X (Y  Z )( X  Y  Z )

5
Karnaugh Map
• Graphical depiction of truth table
• A box for each minterm
♦ So 2 variables, 4 boxes
♦ 3 variable, 8 boxes
♦ And so on
• Useful for simplification
♦ by inspection
♦ Algebraic manipulation harder

6
K-Map from Truth Table
Examples The number of ones needs to add up to
2^0 or 2^1 or 2^2 ect

There's an OR between
each rectangle/ square

BTW the less of em the


better
• There are implied 0s in empty boxes

7
Function from K-Map
• Can generate function from K-map

The standard form

F  XY F  XY  XY  XY
Simplifies to X + Y (in a moment)

8
In Practice:
• Karnaugh maps were mildly useful
when people did simplification
• Computers now do it!
• We’ll cover Karnaugh maps as a way
for you to gain insight,
♦ not as real tool

9
‫‪Three-Variable Map‬‬
‫‪• Eight minterms‬‬
‫‪• Look at encoding of columns and‬‬
‫ﺑﻜﻮﻧﻮ ﺟﲑان ﳌﺎ اﻟﻔﺮق ﺑﲔ ﻛﻞ ﺟﺎر )اﻟﲇ ﻓﻮق ﺗﺤﺖ ﳝﲔ او ﴰﺎل( ﻣﺘﻐﲑ واﺣﺪ‪/‬رﻗﻢ واﺣﺪ‪ /‬ﺑﺮاﱘ واﺣﺪ‬
‫‪rows‬‬

‫‪10‬‬
Simplification
• Adjacent squares (horizontally or
vertically) are minterms that vary
by single variable
• Draw rectangles on map to simplify
function
• Illustration next

11
‫‪Example‬‬
‫ﻋﱯ ‪ ١‬ﻣﺤﻞ اﻟﻮاﺣﺪات اﳌﺸﱰﻛﻪ‬
‫)اﻟﺘﻘﺎﻃﻊ( ﺑﻨﺎﲥﻢ‬

‫ﻋﱯ ‪ 1‬ﻣﺤﻞ اﻟﻮاﺣﺪات اﳌﺸﱰﻛﻪ‬


‫)اﻟﺘﻘﺎﻃﻊ( ﺑﻨﺎﲥﻢ و ﺗﺬﻛﺮ أﻧﻮ ﳌﺎ‬
‫ال‪ prime‬ﺗﺴﺎوي ﺻﻔﺮ ﺑﻨﺘﺞ ‪1‬‬

‫‪F  XY  XY‬‬ ‫‪instead of‬‬


‫‪F  X Y  Z  X Y  Z  X Y  Z  X Y  Z‬‬
‫‪12‬‬
Adjacency is cylindrical
• Note that Z wraps from left edge
to right edge.

13
Covering 4 Squares

is

F  XYZ  XYZ  XYZ  XYZ


F  XZ  XZ
F Z
14
‫‪Another Example‬‬
‫داﳝﺎ ﻻزم ﺗﻜﱪ اﳌ ﺑﻊ او اﳌﺴﺘﻄﻴﻞ ﻗﺪ ﻣﺎ‬
‫ﺑﺘﻘﺪر و اﻋﻤﻞ ﻣ ﺑﻌﺎت ﻟﻌﺒﲔ ﻣﺎ ﺗﻐﻄﻲ ﻛﻞ‬
‫اﻟﻮاﺣﺪات‬

‫‪• Help me solve this one‬‬


‫ﻣﺶ ﴍط اﻟﻮاﺣﺪات ﻳﻐﻄﻮ ﻛﺎﻣﻞ ال‪y/‬‬
‫‪ 'y'/x/x'/z/z‬زي ﻫﻮن‬
‫‪15‬‬
In General
• One box -> 3 literals
• Rectangle of 2 boxes -> 2 literals
• Rectangle of 4 boxes -> 1 literal
• Rectangle of 8 boxes -> Logic 1 (on
3-variable map)
♦ Covers all minterms

16
Slight Variation

• Overlap is OK.
• No need to use full m5-- waste of input

17
4-variable map

• At limit of K-map

18
Also Wraps (toroidal topology)

19
Systematic Simplification
 A Prime Implicant is a product term obtained by combining
the maximum possible number of adjacent squares in the map
into a rectangle with the number of squares a power of 2.
 A prime implicant is called an Essential Prime Implicant if it is
the only prime implicant that covers (includes) one or more
minterms.
 Prime Implicants and Essential Prime Implicants can be
determined by inspection of a K-Map.
 A set of prime implicants "covers all minterms" if, for each
minterm of the function, at least one prime implicant in the
set of prime implicants includes the minterm.

Chapter 2 - Part 2 20
Example of Prime Implicants
 Find ALL Prime Implicants
CD B’D’ and BD are ESSENTIAL Prime Implicants
C C
BD BD
1 1 1 1 1 1

BD 1 1 BD 1 1
B B
1 1 1 1
A A
1 1 1 1 An invalid 1 1 1 1
AB rectangle
bcs it has 3 D
D minterms
AD Minterms covered by single prime implicant
BC
Chapter 2 - Part 2 21
Prime Implicant Practice

 Find all prime implicants for:


F(A, B, C, D)  m(0,2,3,8,9,10,11,12,13,14,15)

Chapter 2 - Part 2 22
Prime Implicant Practice

 Find all prime implicants for:


F(A, B, C, D)  m(0,2,3,8,9,10,11,12,13,14,15)
C
BD
1 1 1

B
1 1 1 1
A
1 1 1 1

A D
BC Chapter 2 - Part 2 23
Algorithm to Find An Optimal
Expression for A Function
 Find all prime implicants.
 Include all essential prime implicants in the
solution
 Select a minimum cost set of non-essential
prime implicants to cover all minterms not yet
covered.
 The solution consists of all essential prime and
the selected minimum cost set of non-essential
prime implicants

Chapter 2 - Part 2 24
The Selection Rule
 Obtaining a good simplified solution:
Use the Selection Rule

Chapter 2 - Part 2 25
Prime Implicant Selection Rule
 Minimize the overlap among prime
implicants as much as possible.

In the solution, make sure that each


prime implicant selected includes at
least one minterm not included in any
other prime implicant selected.

Chapter 2 - Part 2 26
Selection Rule Example
 Simplify F(A, B, C, D) given on the K-
map. Selected Essential
C First step is outlining
C
ALL the prime implcnts
The second step is
1 1 outlining the essential 1 1
prime implicants

1 1 1 1 Third step is
picking prime
1 1 1 1
B
implicints to cover B
all the 1s while
1 keeping note of one
1
A A
thing THE BIGGER
THE TRIANGLE
1 1 THE BETTER 1 1

D D
Minterms covered by essential prime implicants
Chapter 2 - Part 2 27
Don’t Care
• So far have dealt with functions
that were always either 0 or 1
• Sometimes we have some
conditions where we don’t care
what result is
• Example: dealing with BCD
♦ Only care about first 10

28
Mark With an X
• In a K-map, mark don’t care with X
• Simpler implementations
• Can select an X either as 1 or 0

29
Example

or

What would we have if Xs were 0?


30
Selection Rule Example with Don't Cares

 Simplify F(A, B, C, D) given on the K-map.


Selected Essential
C C

1 x 1 x

1 x x 1 1 x x 1
B B
x x
A A
1 1 x 1 1 x

D D
Minterms covered by essential prime implicants
Chapter 2 - Part 2 31
Product of Sums Example
 Find the optimum POS solution:
F(A, B, C, D)  m(3,9,11,12,13,14,15) 
d (1,4,6)
• Hint: Use F and complement it to get the
result.

32

You might also like