0% found this document useful (0 votes)
54 views14 pages

Rangkaian Logika: Karnaugh Maps

The document discusses Karnaugh maps and their use in simplifying Boolean functions through logic minimization. It covers topics such as prime implicants, essential prime implicants, don't cares, and provides examples of using K-maps to find simplified logic expressions in sum of products form.

Uploaded by

Rizal Adiwangsa
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)
54 views14 pages

Rangkaian Logika: Karnaugh Maps

The document discusses Karnaugh maps and their use in simplifying Boolean functions through logic minimization. It covers topics such as prime implicants, essential prime implicants, don't cares, and provides examples of using K-maps to find simplified logic expressions in sum of products form.

Uploaded by

Rizal Adiwangsa
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/ 14

RANGKAIAN LOGIKA

TE 2214
Materi Kuliah ke-6

LOGIC SIMPLICATION

Karnaugh Maps
Karnaugh maps (K-maps) are graphical
representations of boolean functions.
One map cell corresponds to a row in the
truth table.
Also, one map cell corresponds to a
minterm or a maxterm in the boolean
expression
Multiple-cell areas of the map correspond
to standard terms.

Two-Variable Map
x1
0

x2

m0
2

m1
3

m2

m3

x2

OR

x1

m0
1

m2
3

m1

m3

NOTE: ordering of variables is IMPORTANT


for f(x1,x2), x1 is the row, x2 is the column.
Cell 0 represents x1x2; Cell 1 represents
x1x2; etc. If a minterm is present in the
function, then a 1 is placed in the
corresponding cell.

Two-Variable Map (cont.)


Any two adjacent cells in the map differ by
ONLY one variable, which appears
complemented in one cell and
uncomplemented in the other.
Example:
m0 (=x1x2) is adjacent to m1 (=x1x2) and
m2 (=x1x2) but NOT m3 (=x1x2)

2-Variable Map -- Example


f(x1,x2) = x1x2+ x1x2 + x1x2
= m0 + m1 + m2
= x1 + x2
1s placed in K-map for
specified minterms m0, m1, m2
Grouping (ORing) of 1s allows
simplification
What (simpler) function is
represented by each dashed
rectangle?
a1 = m0 + m1
a2 = m0 + m2
Note m0 covered twice

x2
x1

0
2

1
3

Minimization as SOP using K-map


Enter 1s in the K-map for each product
term in the function
Group adjacent K-map cells containing 1s
to obtain a product with fewer variables.
Groups must be in power of 2 (2, 4, 8, )
Handle boundary wrap for K-maps of 3
or more variables.
Realize that answer may not be unique

Three-Variable Map
x

yz

0
1

00
0

m0
m4

01
1

m1
m5

11
3

m3
m7

10
2

m2
m6

-Note: variable ordering is (x,y,z); yz specifies


column, x specifies row.
-Each cell is adjacent to three other cells (left or
right or top or bottom or edge wrap)

Three-Variable Map (cont.)


minterm

The types of structures


that are either minterms or
are generated by repeated
application of the
minimization theorem on a
three variable map are
shown at right.
Groups of 1, 2, 4, 8 are
possible.
group of 2 terms
group of 4 terms

Simplification
Enter minterms of the Boolean function
into the map, then group terms
Example: f(a,b,c) = ac + abc + bc
Result: f(a,b,c) = ac+ b
a bc
0
0

1
00

01

10

1
00

01

10

11

11

More Examples
yz

f1(x, y, z) = m(2,3,5,7)

00

f1(x, y, z) = xy + xz

01

0
1

11

10

f2(x, y, z) = m (0,1,2,3,6)
f2(x,

y, z) = x+yz

1
1

Four-Variable Maps
YZ

00

01

11

10

00 m0

m1

m3

m2

m4

m5

m7

m6

11 m12

m13

m15

m14

m8

m9

m10

m11

WX

01

10

Top cells are adjacent to bottom cells. Left-edge


cells are adjacent to right-edge cells.
Note variable ordering (WXYZ).

Four-variable Map Simplification


One square represents a minterm of 4 literals.
A rectangle of 2 adjacent squares represents a
product term of 3 literals.
A rectangle of 4 squares represents a product
term of 2 literals.
A rectangle of 8 squares represents a product
term of 1 literal.
A rectangle of 16 squares produces a function
that is equal to logic 1.

Example
Simplify the following Boolean function
(A,B,C,D) = m(0,1,2,4,5,7,8,9,10,12,13).
First put the function g( ) into the map, and then
group as many 1s as possible.
ab

cd

00

01

00

01

11

10

11

00 01

10
1

11

10
1

g(A,B,C,D) = c+bd+abd

5-Variable K-Map
DE

A=1

BC

DE
BC

16

17

19

18

20

21

23

22

3 28

2 29

31

30

7 24

6 25

27

26

12

13

15

14

11

10

A=0

ABCDE

ABCDE

Implicants and
Prime Implicants (PIs)
An Implicant (P) of a function F is a product
term which implies F, i.e., F(P) = 1.
An implicant (PI) of F is called a Prime
Implicant of F if any product term obtained
by deleting a literal of PI is NOT an implicant
of F
Thus, a prime implicant is not contained in
any larger implicant.

Example
Consider function f(a,b,c,d) whose Kmap is shown at right.
ab is not a prime implicant because
cd ab
it is contained in b.
1
acd is not a prime implicant because
1
it is contained in ad.
b, ad, and acd are prime implicants. 1
ab 1
acd

b
ad
1
1

acd

Essential Prime Implicants (EPIs)


If a minterm of a function F is included in ONLY
one prime implicant p, then p is an essential
prime implicant of F.
An essential prime implicant MUST appear in
all possible SOP expressions of a function
To find essential prime implicants:

Generate all prime implicants of a function


Select those prime implicants that contain at least one
1 that is not covered by any other prime implicant.

For the previous example, the PIs are b, ad,


and acd; all of these are essential.

ad

1
1
1

1
1

acd

Another Example
Consider f2(a,b,c,d), whose K-map
is shown below.
The only essential PI is bd.
ab
cd
1
1

1
1

Systematic Procedure for


Simplifying Boolean Functions
1. Generate all PIs of the function.
2. Include all essential PIs.
3. For remaining minterms not included in
the essential PIs, select a set of other
PIs to cover them, with minimal overlap
in the set.
4. The resulting simplified function is the
logical OR of the product terms selected
above.

Example
f(a,b,c,d) =
cd
m(0,1,2,3,4,5,7,14,15).
ab
1
Five grouped terms, not all
1
needed.
3 shaded cells covered by only
one term
3 EPIs, since each shaded cell is
covered by a different term.
F(a,b,c,d) = ab + ac + ad + abc

1
1

10

Product of Sums Simplification


Use sum-of-products simplification on the
zeros of the function in the K-map to get
F.
Find the complement of F, i.e. (F) = F
Recall that the complement of a boolean
function can be obtained by (1) taking the
dual and (2) complementing each literal.
OR, using DeMorgans Theorem.

POS Example
cd
ab

F(a,b,c,d) = ab + ac + abcd
Find dual of F, dual(F) = (a+b)(a+c)(a+b+c+d)
Complement of literals in dual(F) to get F
F = (a+b)(a+c)(a+b+c+d)
(verify that this is the same as in slide 60)

11

Don't Care Conditions


There may be a combination of input values which
will never occur
if they do occur, the output is of no concern.

The function value for such combinations is called a


don't care.
They are usually denoted with x. Each x may be
arbitrarily assigned the value 0 or 1 in an
implementation.
Dont cares can be used to further simplify a
function

Minimization using Dont Cares


Treat don't cares as if they are 1s to
generate PIs.
Delete PI's that cover only don't care
minterms.
Treat the covering of remaining don't care
minterms as optional in the selection
process (i.e. they may be, but need not be,
covered).

12

Example
Simplify the function f(a,b,c,d)
whose K-map is shown at the right.
f = acd+ab+cd+abc
or
f = acd+ab+cd+abd
The middle two terms are EPIs, while
the first and last terms are selected to
cover the minterms m1, m4, and m5.
(Theres a third solution!)

Another Example
Simplify the function
g(a,b,c,d) whose K-map
is shown at right.
g = ac+ ab
or
g = ac+bd

cd
ab 00 01 11 10
00 0
01 1

11 0
10 1

cd
ab
x

13

Algorithmic minimization
What do we do for functions with more
than 4-5 variables?
You can code up a minimiser
(Computer-Aided Design, CAD)
Quine-McCluskey algorithm
Iterated consensus

We wont discuss these techniques here


1-Jan-02

Chapter 2-i: Combinational Logic


Circuits (2.1-- 2.5)

27

QUIST
Sederhanakan fungsi Boole berikut ini :

F = A B C D + B C D + A C D

F = A + A B C D + A B C + A B C + A B C

G = WXYZ + WXY + WXYZ + XYZ


H = XYZ + XYZ + XYZ

1-Jan-02

Chapter 2-i: Combinational Logic


Circuits (2.1-- 2.5)

28

14

You might also like