You are on page 1of 33

Chapter 4, Lecture 2

Boolean Expression and


Logic Simplification Using Karnaugh Map

1
The Karnaugh Map

2
Introduction

In 1953, Maurice Karnaugh was a


telecommunications engineer at Bell Labs.
While exploring the new field of digital logic and its
application to the design of telephone circuits, he
invented a graphical way of visualizing and then
simplifying Boolean expressions.
This graphical representation, now known as a
Karnaugh map, or Kmap, is named in his honor.

3
Description of Kmaps and Terminology

A Kmap is a matrix consisting of rows and columns


that represent the output values of a Boolean
function.
The output values placed in each cell are derived
from the minterms of a Boolean function.
A minterm is a product term that contains all of the
function’s variables exactly once, either
complemented or not complemented.

4
K map Cont…?
A Karnaugh map (K-map) is a pictorial method used to
minimize Boolean expressions without having to use
Boolean algebra theorems and equation manipulations.

A K-map can be thought of as a special version of a truth


table . Using a K-map, expressions with two to four
variables are easily minimized.

It’s similar to truth table; instead of being organized (i/p


and o/p) into columns and rows, the K-map is an array of
cells in which each cell represents a binary value of the
input variables.
5
K-Map (Cont…)
The cells are arranged in a way so that
simplification of a given expression is simply a
matter of properly grouping the cells.

K-maps can be used for expressions with 2, 3, 4,


and 5 variables.

3 and 4 variables will be discussed to illustrate


the principles.

6
Terminology

Minterm : We define a Minterm to be a product that contains


all variables of that particular switching function in either
complemented or non-complemented form
 Maxterm : We define a Maxterm to be a sum that contains
all variables of that particular switching function in either
complemented or non-complemented form
Standard SOP(Sum Of Products) : In standard SOP, the
products are obtained directly from the Karnaugh map or truth
table, so the SOP contains all of the variables of the function
Standard POS(Product Of Sums) : In standard POS, the
products are obtained directly from the Karnaugh map or truth
table, so the POS contains all of the variables of the function

7
The 3 Variable K-Map
There are 8 cells as shown:

C
0 1
AB

00 ABC ABC
01 A BC A BC
11 ABC ABC

8
10 AB C AB C
The 4-Variable K-Map

CD
00 01 11 10
AB
00 ABC D ABC D A B CD A B CD

01 A BC D A BC D A BCD A BCD

11 ABC D ABC D ABCD ABCD

10 AB C D AB C D AB CD AB CD

9
Cell Adjacency

CD
00 01 11 10
AB
00
01
11
10

10
K-Map SOP Minimization
The K-Map is used for simplifying Boolean
expressions to their minimal form.
A minimized SOP expression contains the fewest
possible terms with fewest possible variables per
term.
Generally, a minimum SOP expression can be
implemented with fewer logic gates than a standard
expression.

11
Mapping a Standard SOP Expression
For an SOP expression in
C
standard form: 0 1
A 1 is placed on the K-map AB
for each product term in the
expression. 00 ABC ABC
Each 1 is placed in a cell
corresponding to the value of 01 A BC A BC
a product term.
Example: for the product AB C 11 ABC ABC
term , a 1 goes in the 101
cell on a 3-variable map. 10 AB C AB1C
12
Mapping a Standard SOP Expression
(full example)

The expression:
C
A B C  A B C  ABC  AB C 0 1
AB
000 001 110 100
00
1 1
01
Practice:
A B C  A BC  ABC  ABC
A BC  A BC  AB C  AB C 11 1
A B CD  A BC D  ABC D  ABCD  ABC D  A B C D  AB CD

10
1
13
Mapping a Nonstandard SOP Expression

A Boolean expression must be in standard


form before you use a K-map.
If one is not in standard form, it must be
converted.

You may use the procedure mentioned earlier


or use numerical expansion.

14
Mapping a Nonstandard SOP Expression

Numerical Expansion of a Nonstandard product term


Assume that one of the product terms in a certain 3-variable
SOP expression is AB.
It can be expanded numerically to standard form as follows:
 Step 1: Write the binary value of the two variables and attach a 0 for
the missing variable :C100.
 Step 2: Write the binary value of the two variables and attach a 1 for
the missing variable :C101.
The two resulting binary numbers are the values of the
standard SOP terms  AB Cand .
AB C
If the assumption that one of the product term in a 3-
variable expression is B. How can we do this?
15
Mapping a Nonstandard SOP Expression
Map the following SOP expressions on K-maps:

A  AB  ABC
BC  A C
A  C D  ACD  A BCD

16
K-Map Simplification of SOP Expressions

After an SOP expression has been mapped, we can


do the process of minimization:
Grouping the 1s
Determining the minimum SOP expression from
the map

17
Grouping the 1s
 You can group 1s on the K-map according to the
following rules by enclosing those adjacent cells
containing 1s.

 The goal is to maximize the size of the groups


and to minimize the number of groups.

18
Grouping the 1s (rules)
1. A group must contain either 1,2,4,8,or 16 cells
(depending on number of variables in the
expression)
2. Each cell in a group must be adjacent to one or
more cells in that same group, but all cells in the
group do not have to be adjacent to each other.
3. Always include the largest possible number of 1s
in a group in accordance with rule 1.
4. Each 1 on the map must be included in at least
one group. The 1s already in a group can be
included in another group as long as the
overlapping groups include noncommon 1s.
19
Grouping the 1s (example)

C C
AB 0 1 AB 0 1

00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1

20
Grouping the 1s (example)

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

00 1 1 00 1 1

01 1 1 1 1 01 1 1 1

11 11 1 1 1

10 1 1 10 1 1 1
21
Determining the Minimum SOP Expression
from the Map
1. The following rules are applied to find the
minimum product terms and the minimum
SOP expression:
1. Group the cells that have 1s. Each group of
cell containing 1s creates one product term
composed of all variables that occur in only
one form (either complemented or
complemented) within the group. Variables
that occur both complemented and
uncomplemented within the group are
eliminated  called contradictory variables.
22
Determining the Minimum SOP Expression from the Map
2. Determine the minimum product term for each group.
 For a 3-variable map:
1. A 1-cell group yields a 3-variable product term
2. A 2-cell group yields a 2-variable product term
3. A 4-cell group yields a 1-variable product term
4. An 8-cell group yields a value of 1 for the expression.
For a 4-variable map:
1. A 1-cell group yields a 4-variable product term
2. A 2-cell group yields a 3-variable product term
3. A 4-cell group yields a 2-variable product term
4. An 8-cell group yields a a 1-variable product term
5. A 16-cell group yields a value of 1 for the expression.

23
Determining the Minimum SOP Expression
from the Map

3. When all the minimum product terms are


derived from the K-map, they are summed to
form the minimum SOP expression.

24
Determining the Minimum SOP Expression
from the Map (example)

CD
00 01 11 10 B  A C  AC D
AB
00 1 1 AC
01 1 1 1 1 B
11 1 1 1 1
AC D
10 1

25
Determining the Minimum SOP Expression
from the Map (exercises)

C C
AB 0 1 AB 0 1

00 1 00 1 1
AB  BC  A B C B  A C  AC
01 1 01 1
11 1 1 11 1
10 10 1 1

26
Determining the Minimum SOP Expression
from the Map (exercises)
CD CD
AB 00 01 11 10 AB 00 01 11 10
A B  A C  AB D D  AB C  BC

00 1 1 00 1 1

01 1 1 1 1 01 1 1 1

11 11 1 1 1

10 1 1 10 1 1 1
27
Practicing K-Map (SOP)
AB C  A BC  A B C  A B C  AB C
B  AC

B C D  A BC D  ABC D  A B CD  AB CD 
A B CD  A BCD  ABCD  AB CD

D  BC

28
Mapping Directly from a Truth Table
I/P O/P
A B C X C
0 0 0 1 0 1
AB
0 0 1 0
0 1 0 0 00 1
0 1 1 0
1 0 0 1 01
1 0 1 0
1 1 0 1 11 1
1
1 1 1 1
10 1
29
K-Map POS Minimization
The approaches are much the same (as SOP)
except that with POS expression, 0s representing
the standard sum terms are placed on the K-map
instead of 1s.

30
Mapping a Standard POS Expression (full
example)
The expression:
C
0 1
( A  B  C )( A  B  C )( A  B  C )( A  B  C )
AB
000 010 110 101
00
0
01
0
11 0
10
0
31
K-map Simplification of POS Expression

( A  B  C )( A  B  C )( A  B  C )( A  B  C )( A  B  C )

C
0 1
AB A

00 0 0 A( B  C )

01 AB  AC
AB
0 0
11 AC
0 1
B C
10 1 1
32
Rules of Boolean Algebra

1. A  0  A 7. A  A  A
2. A  1  1 8. A  A  0
3. A  0  0 9. A  A
4. A  1  A 10. A  AB  A
5. A  A  A 11 . A  A B  A  B
6. A  A  1 12.( A  B )( A  C )  A  BC
___________________________________________________________
33
A, B, and C can represent a single variable or a combination of variables. 7

You might also like