Sunteți pe pagina 1din 15

Simplification of Boolean Functions

Methods used in simplifying Boolean functions:


1. Boolean algebra
2. Karnaugh Map
3. Variable-Entered Map (VEM)
4. Tabular Minimization or Quine-McCluskey Method

KARNAUGH MAP (K-MAP)

It originated from the map method proposed by Veitch also called the Veitch
Diagram and then modified by Karnaugh.

It is a pictorial form of a truth table and could handle up


to 6 variables.

It is used to reduce or simplify a Boolean function.

It is an array of cells/squares in which each cell represents


a binary value of the input variables.

Realization from K-map:

1. The number of cells is 2n where n is the number of


inputs/variables.
2. At all times, the adjacency of cells rule is observed, i.e., 2
squares or cells are adjacent if there is only one variable that
changes from one cell to the next.
3. In grouping 0s or 1s:
a) Start from the cell that can be grouped only in one way or
only by itself.
b) Maximize the number of cells per group (power of 2)
c) Minimize the number of groups.
4. In writing the desired term to represent a certain group, consider only the variables
that did not change within the group.
5. The correct grouping of 1s will result in the simplified SOP expression while the
correct grouping of 0s will result in the simplified POS expression.

pee ess:
Each square represents one minterm.
Since any Boolean function can be expressed as a sum of minterms, it follows that a
Boolean function is recognized graphically in the map from the area enclosed by
those squares whose minterms are included in the function.

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

Map Set-Up
A.) Two-Variable K-Map
Given: F(a,b)

0
1

a'b'
m0
ab'
m2

a'b
m1
ab
m3

# of Cells/
Group

# of Inputs
to represent the group

2
1

1
2
4

grouping of 1s - F = 1
grouping of 0s - F = 0

B.) Three-Variable K-Map


Given: F(a,b,c)

ab
bc

00

00 01 11 10

0
1

a'b'c' a'b'c a'bc a'bc'


m0 m1 m3 m2
ab'c' ab'c abc abc'
m4 m5 m7 m6

01
11
10

# of Cells/
Group

1
2
4
8
SWIDLEC Lecture Notes
Edzel R. Lapira
zell@mozcom.com

a'b'c'
m0
a'bc'
m2
abc'
m6
ab'c'
m4

a'b'c
m1
a'bc
m3
abc
m7
ab'c
m5

# of Inputs
to represent the group

3
2
1
grouping of 1s - F = 1
grouping of 0s - F = 0

C.) Four-Variable K-Map


Given: F(a,b,c,d)

cd
ab

00 01 11 10

00

m0

m1

m3

m2

01

m4

m5

m7

m6

11

m12 m13 m15 m14

10

m8

m9

# of Cells/
Group

m11 m10

# of Inputs
to represent the group

4
3
2
1

1
2
4
8
16

grouping of 1s - F = 1
grouping of 0s - F = 0

D.) Five-Variable K-Map


Given: F(a,b,c,d,e)

cde
ab 000 001 011 010

110 111 101 100

00

m0

m1

m3

01

m8

m9

m11 m10

m14 m15 m13 m12

11

m24 m25 m27 m26

m30 m31 m29 m28

10

m16 m17 m19 m18

m22 m23 m21 m20

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

m2

m6

m7

m5

m4

Cell Adjacency
The cells in a Karnaugh map are arranged so that there is only a single -variable
change between adjacent cells.
Adjacency is defined by a single-variable change. Cells that differ by only one
variable are adjacent. Cells with values that differ by more than one variable are not adjacent.
Physically, each cell is adjacent to the cells that are immediately
next to it on any of its four sides. A cell is not adjacent to the
cells that diagonally touch any of its corners. Also, the cells
in the top row are adjacent to the corresponding cells in
the bottom row and the cells in the outer left column are
adjacent to the corresponding cells in the outer right
column. This is called wrap-around adjacency.

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

KARNAUGH MAP SOP MINIMIZATION


Mapping a Canonical Sum-of-Minterms Expression
For a Boolean function in canonical form (sum-of-minterms), a 1 is placed on the
Karnaugh map for each product term in the expression. Each 1 is placed in a cell
corresponding to the value of a product term.
When a sum-of-minterms expression is completely mapped, there will be a number of
1s on the Karnaugh map equal to the number of product terms in the canonical form. The
cells that do not have a 1 are the cells for which the expression is 0.

Steps:
1. Determine the binary value of each product in the standard SOP
expression.
2. As each product term si evaluated, place a 1 on the Karnaugh map in the
cell having the same value as the product term.

Example: F(A,B,C) = ABC + ABC + ABC + ABC

C
AB
0

00 1

1
1

ABC + A BC + ABC + A BC
000

01
11 1
10 1

Additional Exercises
F(W,X,Y,Z) = (0,1,6,12,15)
F(A,B,C) = ABC + ABC + ABC + ABC
F(A,B,C,D) = (1,3, 4,10, 12,13,15)

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

001

110

100

Mapping a Standard Sum-of-Products Expression


A Boolean expression should first be in canonical sum-of-minterms expression. If an
expression is not in canonical form, then it must be converted to sum-of-minterms by the
procedure discussed before or by numerical expansion.
Example: F(A,B,C) = A +AB +ABC

C
AB
0

00 1

1
1

01 1

A + A B + ABC
000 100
001 101
010
011

110

11 1
10 1

Additional Exercises:
F(A,B,C,D) = BC + AB +ABC + ABCD+ ABCD + ABCD
F(A,B,C,D) = A + CD + ACD + ABCD

Mapping Directly from a Truth Table


Recall that a truth table gives the output of a Boolean expression for all possible input
variable combinations. The 1s in the output column of the truth table are mapped directly
onto a Karnaugh map into the cells corresponding to the values of the associated input
variable combinations.

Inputs
A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

Output
F
1
0
0
0
1
0
1
1

C
AB
0

00 1
01
11 1
10 1

Karnaugh Map Simplification of SOP Expressions


Minimization is the process that results in an expression containing the fewest
possible terms with the fewest possible variables (and literals!). After an SOP expression has
been mapped, there are three steps in obtaining a minimum SOP expression:
grouping the 1s
determining the product term for each group, and
summing the resulting product terms.

Grouping the 1s
Group the 1s on the Karnaugh map according to the following rules by enclosing
those adjacent cells containing 1s. The goal is to maximize the size of the group and to
minimize the number of groups.
1. A group must contain either 1, 2, 4, 8, 16, 32 or 64 cells. (or
power of 2!)
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.

C
AB
0

00 1

C
AB
0

00

01

01

11 1

11 1

10

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

10

C
AB
0

C
AB
0

1
1

00 1

00 1

01 1

1
1

01 1

11

11

10 1

10 1

Wrap-around adjacency

CD

00 01 11 10
00 1 1

AB

01 1

11
10

CD

00 01 11 10
00 1 1

AB

01 1

11
1

10

CD

00 01 11 10
00 1
1

AB

CD

00 01 11 10
00 1
1

AB

01 1

01 1

11 1

11 1

10 1

10 1

Wrap-around adjacency

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

Determining the Minimum SOP Expression from the Map


When all of the 1s representing the canonical minterms in an expression are properly
mapped and grouped, the process of determining the resulting minimum SOP expression
begins.
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 uncomplemented or
complemented) within the group. Variables that occur both uncomplemented and
complemented within each group are eliminated. These are called contradictory
variables.
2. Determine the minimum product term for each group.
3. When all the minimum product terms are derived from the Karnaugh map, they are
summed to form the minimum SOP expression.

C
AB
0

00

A'B'C'

01

11 1

BC

10

AB

F(A,B,C) = A'B'C'+BC+AB

C
AB
0

00 1

1
1

01 1

A'C'

11

10 1

AC

B'

F(A,B,C) = A'C'+AC+B'
SWIDLEC Lecture Notes
Edzel R. Lapira
zell@mozcom.com

CD

00 01 11 10
00 1 1

A'C'

01 1

A'B

AB

11
10

AB'D

F(A,B,C,D) = A'C+A'B+AB'D

CD

00 01 11 10
00 1
1

AB

01

11

10

D'
BC'

F(A,B,C,D) = AB'C+BC'+D'

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

AB'C

Dont Care Conditions


Sometimes a situation arises in which some input variable combinations are not
allowed. For example, recall that in the BCD code, there are six invalid combinations. For
NBCD: 1010, 1011, 1100, 1101, 1110 and 1111. Since these unallowed states will never
occur in an application involving the BCD code, they can be treated as dont care terms
with respect to their effect on the output. That is, for these dont care terms either a 1 or a 0
may be assigned to the output; it really does not matter since they will never occur.
For each dont care term, an X is placed in the cell. The dont care terms can be
used as an advantage when simplifying because when grouping the 1s, the Xs can be treated
as 1s to make a larger grouping. The larger a group, the simpler the resulting term will be.

Example: Create a function that would give a 1 output only when NBCD code for 7, 8 or 9 is
present on the inputs.

Inputs Output
ABCD
F
0 0 0 0
0
0 0 0 1
0
0 0 1 0
0
0 0 1 1
0
0 1 0 0
0
0 1 0 1
0
0 1 1 0
0
0 1 1 1
1
1 0 0 0
1
1 0 0 1
1
0 1 0 0
X
0 1 0 1
X
0 1 1 0
X
0 1 1 1
X
1 0 0 0
X
1 0 0 1
X

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

AB

CD

00 01 11 10

00
1

01

BCD

11 X

10 1

F(A,B,C,D) = A+BCD

Karnaugh Map Simplification of POS Expressions


Mapping a Canonical Product-of-Maxterms Expression
For a canonical product-of-maxterms expression, a 0 is placed on the Karnaugh map
for each sum term in the expression. Each 0 is placed in a cell corresponding to the value of a
sum term.
When the expression is completely mapped, there will be a number of 0s on the
Karnaugh map equal to the number of sum terms in the canonical product-of-maxterms
expression. The cells that do not have a 0 are the cells for which the expression is 1. Usually,
when working with maxterms, the 1s are left off.
1. Determine the binary value of each term in the canonical product-of-maxterms
expression
2. As each sum term is evaluated, place a 0 on the Karnaugh map in the corresponding
cell.

C
AB
0

00 0

(A+B+C)(A+B'+C)(A'+B'+C)(A'+B+C')
000

010

110

101

01 0
11 0
10

Map the following canonical product-of-maxterm on a Karnaugh map:


(A + B + C + D)(A + B + C+D)(A + B + C + D)(A + B + C + D)(A + B + C + D)

CD

A + B + C' + D'

00 01 11 10
0 0
00

AB

A + B + C' + D

01
11 0

10

A' + B' + C + D

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

A' + B + C' + D'

A' + B' + C' + D'

Karnaugh Map Simplification of POS Expressions


The product for minimizing a POS expression is basically the same as for an SOP
expression except that you group 0s to produce minimum sum terms instead of grouping 1s
to produce minimum product terms. The rules for grouping the 0s are the same as those for
grouping the 1s.

CD

00 01 11 10
00
0 0

A + B + C'

01

A' + B' + C + D

AB

11 0

10

A' + C' + D'

F(A,B,C,D) = (A + B + C')(A' + B' + C +D)(A' + C' + D')

CD

A+B+C

01 0

C+D

00 01 11 10
00 0
0

AB

11 0
10 0

A' + B

F(A,B,C,D) = (A + B +C)(C + D)(A' + B)

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

Converting Between POS and SOP Using the Karnaugh Map


When a POS expression is mapped, it can easily be converted to the equivalent SOP
form directly from the Karnaugh map. Also, given a mapped SOP expression, an equivalent
POS expression can be derived directly from the map. This provides a good way to compare
both minimum forms of an expression to determine if one of them can be implemented with
fewer gates than the other.
For a POS expression, all the cells that do not contain 0s contain 1s, from which the
SOP expression is derived. Likewise, for an SOP expression, all the cells that do not contain
1s contain 0s, from which the POS expression is derived.
Sample Problem:
Using a Karnaugh map, convert the following canonical POS (product-of-maxterms)
expression into a minimum POS expression, a canonical SOP expression (sum-of-minterms)
and a minimum SOP expression.

(A + B + C + D)(A + B + C + D)(A + B + C + D)(A + B + C + D)


(A + B + C + D)(A + B + C + D)
CD

CD

00 01 11 10
00
0 0 0

A + B + C'

00 01 11 10
00 1 0 0 0

01 0

B' + C + D

01 0

11 0

10 1

AB

AB

11 0
10

B + C + D'

Minimum POS Expression:


F(A,B,C,D) = (A + B + C)'(B' + C + D)(B + C + D')

Canonical SOP Expression:


F(A,B,C,D) = S(0,5,6,7,8,10,11,13,14,15)

CD

00 01 11 10
00 1 0 0 0

B'C'D'
BD

01 0

BC

11 0

10 1

AB

F(A,B,C,D) = B'C'D' + BD + BC + AC

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

AC

Additional Exercises:

F (A,B,C,D) = (0,2,4,5,7,8,9,10,11,13,15)
F(A,B,C,D,E) = (0,2,4,6,9,13,21,23,28,29,31)
Design a 4-bit even number detector
F(w,x,y,z) = wxy + yz + xyz + xy
5. F(A,B,C,D,E) = ABCE + ABCD + BDE + BCD + CDE
+BDE
1.
2.
3.
4.

SWIDLEC Lecture Notes


Edzel R. Lapira
zell@mozcom.com

S-ar putea să vă placă și