You are on page 1of 32

Erik Jonsson School of Engineering and

The University of Texas at Dallas


Computer Science

Simplifying Logic Circuits with Karnaugh Maps


• The circuit at the top right is the logic
equivalent of the Boolean expression:
f = abc + abc + abc   
a
• Now, as we have seen, this expression
can be simplified (reduced to fewer b
terms) from its original form, using the f
Boolean identities as shown at right.
• The circuit may be simplified as c
follows:
f = abc + abc + abc   
f = abc + abc + abc + abc    a
(since x=x+x) b f
f = ( abc + abc ) + ( abc + abc  ) 
f= ac ( b + b ) + ab( c + c  )  c
or, =
f ac + ab  

1 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Simplifying Logic Circuits (2)


• Since you have now had some a
experience with simplification of
Boolean expressions, this
example is (hopefully) familiar
b f
and understandable.
• However, for more complex c
Boolean expressions, the Original logic circuit
identity/substitution approach a
can be VERY cumbersome (at
least, for humans). b f
• Instead of this approach, we can
c
use a graphical technique called
the Karnaugh map. Simplified equivalent logic circuit

2 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Karnaugh Maps
• Another approach to simplification is
called the Karnaugh map, or K-map. y y
• A K-map is a truth table graph, which 00 01
aids in visually simplifying logic. x 0 1 This minterm
• It is useful for up to 5 or 6 variables, and is expressed as
10 11
is a good tool to help understand the x f = xy .
process of logic simplification. 2 3
• The algebraic approach we have used Two-Variable K-map,
previously is also used to analyze complex labeled for SOP terms.
circuits in industry (computer analysis).
Note the four squares
• At the right is a 2-variable K-map. represent all the com-
• This very simple K-map demonstrates binations of the two
that an n-variable K-map contains all the K-map variables, or
combination of the n variables in the K-
map space. minterms, in x & y
(example above).
3 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Three-Variable Karnaugh Map


• A useful K-map is one of three variables.
• Each square represents a 3-variable y z yz yz yz
minterm or maxterm.
000 001 011 010
• All of the 8 possible 3-variable terms are
represented on the K-map.
x 0 1 3 2
100 101 111 110
• When moving horizontally or vertically,
only 1 variable changes between adjacent
x 4 5 7 6
squares, never 2. This property of the K-
map, is unique and accounts for its
unusual numbering system. As an example, this
• The K-map shown is one labeled for SOP minterm cell (011)
terms. It could also be used for a POS represents the
problem, but we would have to re-label minterm f = x yz .
the variables.
4 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Four Variable Karnaugh Map


• A 4-variable K-map can simplify yz yz yz yz
problems of four Boolean variables.*
0000 0001 0011 0010
• The K-map has one square for each
possible minterm (16 in this case).
wx 0 0 1 1 3 3 2 2
0100 0101 0111 0110
• Migrating one square horizontally or 1 1 1 1
vertically never results in more than
wx 4 4 5 5 7 7 6 6

one variable changing (square 1100 1101 1111 1110


wx 1 13 F 1 15
designations also shown in hex). C 12 D E 14
1000 1001 1011 1010
* Note that on all K-maps, the left and right
edges are a common edge, while the top and
wx 8 8 9 9 B 11 A 10
bottom edges are also the same edge. Thus,
the top and bottom rows are adjacent, as are Note that this is still an
the left and right columns. SOP K-map.

5 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Exercise 1
• We will use the Karnaugh map to yz yz yz yz
simplify Boolean expressions by
0000 0001 0011 0010
placing minterm or maxterm
values on the map and then wx 0 0 1 1 3 3 2 2
grouping terms to develop 0100 0101 0111 0110

simpler Boolean expressions. wx 4 4 5 5 7 7 6 6


• Let’s practice placing some terms 1100 1101 1111 1110
on the K-map shown. For the
wx
C 12 D 13 F 15 E 14
SOP Boolean expression below, 1000 1001 1011 1010
place 1’s and zeros on the map. wx 8 8 9 9 B 11 A 10

f = wxyz + wxyz + wxyz + wxyz Karnaugh map labeled for


SOP problem solution.

6 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Karnaugh Map Comments


• K-maps can be labeled many ways, but yz yz yz yz
in EE 2310, always use this labeling!
0000 0001 0011 0010
• Each square is unique. We can label it
in binary, decimal, or hex. We can also
wx 0 0 1 1 3 3 2 2
0100 0101 0111 0110
designate the Boolean function by the 1 1 1 1
K-map squares it occupies. wx 4 4 5 5 7 7 6 6

• The minterms on the K-map can be 1100 1101 1111 1110


wx 1 13 F 1 15
labeled as f=Σm(5, 7, 13, 15) in decimal, C 12 D E 14
or f= Σm(5, 7, D, F) in hex.* 1000 1001 1011 1010
• Given the Sigma (Σ) coordinates, you wx 8 8 9 9 B 11 A 10
could immediately deduce that the SOP Observe that the Σ notations (in
function was: f = wx yz + wxyz + wx yz + wxyz either SOP or POS) completely
describe the Boolean function
* Σm is the symbol for the “Boolean sum” (OR) coordinates of mapped on the K-map, as long as one
the squares. knows what the input variables are.
7 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Exercise 2
yz yz yz yz
• Try your hand at developing 0000 0001 0011 0010
the Boolean expression from wx
the f = Σm designation on a K-
0 0 1 1 3 3 2 2
0100 0101 0111 0110
map. 1 1 1 1
wx 4 4 5 5 7 7 6 6
• The Σm designation of a 1100 1101 1111 1110
Boolean function is given as wx
C 12 D 13 F 15 E 14
f= Σm(9, B, D, F) (SOP). 1000 1001 1011 1010
• Find the Boolean expression by wx 8 8 9 9 B 11 A 10
plotting the 1’s on the chart
and developing the expression
from the minterms.

8 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Karnaugh Map Terminology


• In the K-map at right, each small yz yz yz yz
square, or cell, represents one 4- 0000 0001 0011 0010
variable Boolean AND function, or wx 0 0 1 1 3 3 2 2
minterm (if we wanted, we could 0100 0101 0111 0110
label it to represent OR functions wx 1 1 1 1
4 4 5 5 7 7 6 6
or maxterms).
1100 1101 1111 1110
• Any square or rectangular group wx 1 13 F 1 15
of cells that is a power of 2 (1, 2, 4, C 12 D E 14

8, 16) is called an implicant. 1000 1001 1011 1010

• All of the groups of squares in the


wx 8 8 9 9 B 11 A 10
K-map to the left (including the Examples of various cell groupings,
single square) represent implicants all of which represent K-map
of different sizes. implicants.

9 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Prime Implicants
• We will be simplifying Boolean
functions plotting their values on yz yz yz yz
a K-map and grouping them into 0000 0001 0011 0010

prime implicants. wx 0
1 0 1
0 1 3
1 3 2
1 2
• What is a prime implicant? It is 0100 0101 0111 0110

an implicant that covers as many wx 11 01 11 11


4 4 5 5 7 7 6 6
1 values (SOP K-map) or 0 1100 1101 1111 1110
values (POS K-map) as possible, wx 1 11 11 1
C 12 D 13 F 15 E 14
yet still retains the identity of
1000 1001 1011 1010
implicant (# of cells = power of 2, wx 1 0 0 0
rectangular or square shape). 8 8 9 9 B 11 A 10

• Some SOP prime implicants are


shown on the adjoining K-map.
10 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

More Karnaugh Map Terminology


• Distinguished 1-cell: A single Another prime implicant
minterm that can be covered by only yz yz yz yz
one prime implicant.
0000 0001 0011 0010
• Essential prime implicant: A prime
implicant that covers one or more wx 0 0 1 1 3 3 2 2
distinguished 1-cells. 0100 0101 0111 0110

• Note: Every fully minimized wx 4 1 4 5 1 5 7 11 7 6 1 6


Boolean expression must include all 1100 1101 1111 1110
of the essential prime implicants of f. wx 1 11 1
C 12 D 13 F 15 E 14
• In the K-map at right, the Boolean
minterm f = wxyz is a distinguished 1000 1001 1011 1010
1-cell, and the essential prime w x 8 8 9 9 B 11 A 10
implicant f = wxy is the only prime Essential prime implicant that Distinguished 1-cell
implicant that includes it. covers distinguished 1-cell

11 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

“Prime Implicants”
• As noted two slides back, a “prime Since x & z do not change value over the implicant,
implicant” is the largest square or they are the variables in the new Boolean minterm.
rectangular implicant of cells
occupied by a 1 (SOP) or 0 (POS). yz yz yz yz
Thus a prime implicant will have 1,
2, 4, or 8 cells (16 is a trivial prime). 0000 0001 0011 0010
• How do we determine the Boolean wx 0 0 1 1 3 3 2 2
expression for a prime implicant? 0100 0101 0111 0110
• The Boolean expression for an SOP
wx 1 15 11 1
prime implicant is determined by 4 4 5 7 7 6 6
creating a new minterm whose only 1100 1101 1111 1110
variables are those that do NOT wx 1 13 F 1115
change value (0→1 or 1→0) over the C 12 D E 14
extent of the prime implicant. 1000 1001 1011 1010
• Thus the prime implicant at right wx 8 8 9 9 B 11 A 10
may be represented by the Boolean
Example of a prime implicant
expression: f = xz.
12 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Logic Simplification – an SOP Example


• We simplify a Boolean expression by
finding its prime implicants on a K-Map. yz yz yz yz
• To do this, populate the K-map as follows:
0000 0001 0011 0010
– For an SOP expression,* find the K-Map
cell for each minterm of function f, and wx 0 0 1 1 3 3 2 2
place a one (1) in it. Ignore 0’s. 0100 0101 0111 0110
– Circle groups of cells that contain 1’s. wx 11 11 11 11
4 4 5 5 7 7 6 6
– The number of cells enclosed in a circle
1100 1101 1111 1110
must be a power of 2 and square or
rectangular.
wx 11 13 F 1115
C 12 D E 14
– It is okay for groups of cells to overlap. 1000 1001 1011 1010
– Each circled group of cells corresponds to a wx 8 8 9 9 B 11 A 10
prime implicant of f.
– Note that the more cells a given circle
* A POS example will follow.
encloses, the fewer variables needed to
specify the implicant!
13 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Using the K Map for Logic Simplification (2)


• Another example: yz yz yz yz
– The implicants of f are 4, 6, 12, 14. 0000 0001 0011 0010
– This corresponds to the function: wx 0 0 1 1 3 3 2 2
f = wx yz + wxyz + wx yz + wxyz 0100 0101 0111 0110
– We create a prime implicant by wx 1
1 1 1 1
4 4 5 5 7 7 6 6
grouping the 4 cells representing f.
1100 1101 1111 1110
– On the wx axis, the cells are 1 wx 1 12 1 13 F 1 15 114
whether or not w is one, and C D E
always when x is 1 (w not needed). 1000 1001 1011 1010
– On the yz axis, the cells are 1 wx 8 8 9 9 B 11 A 10
whether or not y is one, and Remember: For purposes of grouping implicants, the
always when z is 0 (y not needed). top and bottom rows of the K-map are considered
adjacent, as are the right and left columns.
– Thus the simplified expression for This grouping takes advantage of the fact that the left
f is: f = xz . and right columns are adjacent.

14 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

A POS K-Map
• On a POS K-map, the procedure is
the same, except that we map 0’s. y+ z y+z y+z y+z
• Let: 0000 0001 0011 0010
f = (w + x + y + z) ⋅ (w + x + y + z) w + x 0 0 1 1 3 3 2 2
⋅( w + x + y + z ) ⋅ ( w + x + y + z ) 0100 0101 0111 0110
• We find prime implicants exactly w+ x 4
1
4 5
1
5 7
1
7 6
1
6
the same way – except that we look
1100 1101 1111 1110
for variable that produce 0’s. w+ x C 12 D
1 13 F 01 15 E 0 14
• As shown, w and y do not change
over the extent of the function. 1000 1001 1011 1010

• The simplified expression


w+ x 8 8 9 9 B
0 11 A
0 10
is: =
f ( w + y ). The simplified
circuit is shown at right. f

15 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Summary of Karnaugh Map Procedure


• In summary, to simplify a Boolean expression using a K-Map:
1. Start with the truth table or Boolean expression, if you have one.
2. If starting from the truth table, write the Boolean expression for each
truth table term that is 1 (if SOP) or 0 (if POS).
3. (Develop the full Boolean expression, if necessary, by OR-ing the AND
terms together if SOP or AND-ing OR terms if POS.)
4. On the K-Map, plot 1’s (for SOP) or 0’s (for POS).
5. Group implicants together to get the largest set of prime implicants
possible. Prime implicants may overlap each other. They will always be
square or rectangular groups of cells that are powers of 2 (1, 2, 4, 8).
6. The variables that make up the term(s) of the new expression will be
those which do not vary in value over the extent of each prime implicant.
7. Write the Boolean expression for each prime implicant and then OR (for
SOP) or AND (for POS) terms together to get the new expression.
16 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

K-Map Example of Prime Implicants


• The Boolean expression
represented is: yz yz yz yz
f = wx yz + wxyz + wxyz + wx yz 0000 0001 0011 0010

+ wxyz + wxyz + wx yz + wxyz


wx 0 0 1 1 3 3 2 2
0100 0101 0111 0110
• Note that since prime implicants wx 1 1
1 1
1 1
1
4 4 5 5 7 7 6 6
must be powers of 2, the largest
group of squares we can circle is 4. 1100 1101 1111 1110
wx 11 13 F 11 15 E 1 14
• Thus we circle three groups of 4 C 12 D
(in red). The circles may overlap. 1000 1001 1011 1010
• We now write the new SOP wx 8 8 9 1 9 B 1 11 A 10
simplified expression. It is:
NOT a prime implicant!
f = xy + xz + wz
17 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Another SOP Minimization, Given the Truth Table


w x y z f
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0 1
0 1 0 1 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0
1 1 1 1

18 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Minterms Plotted on K-Map


• The four minterms are plotted yz yz yz yz
on the truth table. 0000 0001 0011 0010
• Note that they easily group into wx 0 0 1 1 3 3 2 2
one prime implicant. 0100 0101 0111 0110
• Over the extent of the prime wx 1 1 1 1
4 4 5 5 7 7 6 6
implicant, variables w & z vary,
so they cannot be in the 1100 1101 1111 1110

Boolean expression for the


wx 112 1 13 F 1 15
C D E 14
prime implicant. 1000 1001 1011 1010
• Variables x and y do not vary. wx 8 8 9 9 B 11 A 10
• Thus the expression for the
minimum SOP representation The original Boolean expression is:
must be f = x y . f = wx yz + wx yz + wx yz + wx yz
19 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Original and Simplified Circuits

Equivalent circuit after reduction


using Karnaugh map.

Logic circuit from truth table.

20 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Exercise 3
• The truth table below was developed from a “spec.” Show the
SOP expression and then minimize it using a K-map and draw
the minimized circuit.
x y z f
0 0 0 1 y z yz yz yz
0 0 1 0 000 001 011 010
0 1 0 1 x 0 1 3 2
0 1 1 1 100 101 111 110
1 0 0 0 x 4 5 7 6
1 0 1 0
1 1 0 0
1 1 1 1

21 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Another Example: Biggest Prime Implicants


w x y z f
0 0 0 0
0 0 0 1 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1 1
0 1 1 0
0 1 1 1 1
1 0 0 0
1 0 0 1 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1 1
1 1 1 0
1 1 1 1 1

22 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Minimization Using Four-Variable K-Map


yz yz yz yz yz yz yz yz
0000 0001 0011 0010 0000 0001 0011 0010
wx 1 wx 1
0 0 1 1 3 3 2 2 0 0 1 1 3 3 2 2
0100 0101 0111 0110 0100 0101 0111 0110
wx 1 15 1 1 wx 1 1 1 1
4 4 5 7 7 6 6 4 4 5 5 7 7 6 6
1100 1101 1111 1110 1100 1101 1111 1110
wx 1 1 wx 1 13 F 1 15
C 12 D 13 F 15 E 14 C 12 D E 14
1000 1001 1011 1010 1000 1001 1011 1010
wx 8 8 9 1 9 B 11 A 10
wx 8 8 9 1 9 B 11 A 10
Incorrect solution (partial Correct Solution:
minimization):= f xyz + yz =
f xz + yz
Remember: Prime implicants should overlap, if this means that they can be made larger.
23 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Resulting Circuit

x
y f
z

Note that the resulting circuit uses 3 logic gates,


whereas the original expression, with six minterms,
would have used a minimum of seven gates and
four inverters.

24 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Sometimes Major Simplification is Not Possible

• Using the Σ notation: yz yz yz yz


f = Σm(1,2,3,5,7,11,13) 0000 0001 0011 0010
wx 0 0 1
1 1 3
1 3 2
1 2
• Note that there are 3
0100 0101 0111 0110
distinguished one-cells (in red). 1
• There must therefore be at least
wx 4 4 5 11 5 7 11 7 6
1
6

3 prime implicants (4 in this 1100 1101 1111 1110

case, 3 essential).
wx 11 13 F 1 15
C 12 D E 14
• The simplified expression (and 1000 1001 1011 1010
not very simplified at that) is: wx 1
8 8 9 9 B 11 A 10

f =wz + w xy + x yz + x yz

25 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Exercise 4
A truth table and its Boolean expression are shown below, along
with the circuit of this unsimplified expression. Use the K-map
on the following page to simplify and draw the simplified circuit.
w x y z f
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0 Original Circuit
f = wx yz + wxyz + wxyz + wx yz
1 1 0 1 1
1 1 1 0
1 1 1 1
26 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Karnaugh Map of Last Example

yz yz yz yz
0000 0001 0011 0010
wx 0 0 1 1 3 3 2 2
0100 0101 0111 0110
wx 1
4 4 5 5 7 7 6 6
1100 1101 1111 1110
wx 1 15
C 12 D 13 F E 14
1000 1001 1011 1010
wx 8 8 9 9 B 11 A 10

27 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

The Concept of “Don’t Cares”


• The six implicants on the K-Map
shown can be represented by the yz yz yz yz
simplified expression f = x y + x z. 0000 0001 0011 0010
• Suppose for our particular logic wx 0
X0 1 1 3 3 2 2
system, we know that y and z will 0100 0101 0111 0110
never be 0 together. wx 1
X 1 1 1
4 4 5 5 7 7 6 6
• Then the yz implicants do not 1100 1101 1111 1110
matter, since they cannot happen. wx X 1 1 1
C 12 D 13 F 15 E 14
• To show the condition cannot occur,
1000 1001 1011 1010
we put X’s in the column -- they are wx X
“don’t cares” -- conditions that 8 8 9 9 B 11 A 10

cannot happen.
28 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

“Don’t Cares” (2)


• Since the function will never get into
the left column, we “don’t care” how
those minterms are represented. yz yz yz yz
Why not make them 1’s?
0000 0001 0011 0010
• Doing that, we can make a much
larger prime implicant and a simpler
wx 0 10 1 1 3 3 2 2
0100 0101 0111 0110
Boolean expression. For this 11 11 11 11
implicant, f = x.
wx 4 4 5 5 7 7 6 6
1100 1101 1111 1110
• The expression is valid, since the wx 1 1113 F 1115 114
forbidden condition will never allow C 12 D E
the two left squares to be occupied. 1000 1001 1011 1010

• “Don’t cares” let us further simplify


wx 8
1
8 9 9 B 11 A 10
an expression.
29 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15
Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

“Don’t Cares” – Another Example


• Assume the Boolean expression is as
shown on the K-map (black 1’s and
yz yz yz yz
black prime implicants). 0000 0001 0011 0010
• The simplest SOP expressions for the wx 0 0 1 1 3 3 2 2
=
function is f wxz + wxy . 0100 0101 0111 0110
• Also assume that wx yz and wx yz wx 1 1
1 1
1 1
cannot occur. 4 4 5 5 7 7 6 6
• Since these cannot ever happen, they 1100 1101 1111 1110
are “don’t cares,” and since they are wx 1 12 11 13 F 1115 114
C D E
“don’t cares,” make them 1 (red)!
1000 1001 1011 1010
• We can then further simplify the
expression to f = w x + x z (larger wx 8 8 9 9 B 11 A 10
prime implicants).

30 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

“Don’t Cares” -- Summary


• “Don’t Cares” occur when there are variable combinations,
represented by squares on a Karnaugh map, that cannot occur in
a digital circuit or Boolean expression.
• Such a square is called a “Don’t Care.” Since it can never happen,
we can assign a value of 1 to the square and use that 1 to (possibly)
construct larger prime implicants, further simplifying the circuit
(you could assign it the value 0 in a POS representation).
• Circuits or Boolean expressions derived using “Don’t Care”
squares are as valid as any other expression or circuit.
• We will see later in sequential logic that the concept of “Don’t
Cares” will help in simplifying counter circuits.

31 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15


Erik Jonsson School of Engineering and
The University of Texas at Dallas
Computer Science

Exercise 5
• An SOP Boolean expression is yz yz yz yz
defined as f=Σm(2, 6, C, D, F, E). 0000 0001 0011 0010

• The inputs are such that w is wx 0 0 1 1 3 3 2 2


never 1 when x = 0. 0100 0101 0111 0110
wx 1 1 1
• Find the simplified expression 4 4 5 5 7 7 6 6
and draw the simplified circuit. 1100 1101 1111 1110
wx
C 12 D 13 F 15 E 14
1000 1001 1011 1010
wx 8 8 9 9 B 11 A 10

32 Lecture #5: Logic Simplification Using Karnaugh Maps © N. B. Dodge 9/15

You might also like