Você está na página 1de 14

Dr. N.

Magaji
BUK-Nigeria
Digital Logic
Lecture 4
Chapter 3
Topics to cover are:
Kanough Mapping: Two, three, and four
variables K-map. Examples of digital systems
design using practical applications in the
areas of security, control and management.
Karnaugh Maps (K Map)
To use a Karnaugh map to simplify an expression:
Draw a map with one box for each possible product term in the expression. The
boxes must be arranged so that a one-box movement either horizontal or vertical
changes one and only one variable. See Figure 1.
For each product term in the expression to be simplified, place a checkmark in the
box whose labels are the product's variables and their complements.
Draw loops around adjacent pairs of checkmarks. Blocks are "adjacent"
horizontally and vertically only, not diagonally. A block may be "in" more than one
loop, and a single loop may span multiple rows, multiple columns, or both, so long
as the number of checkmarks enclosed is a power of two.
For each loop, write an unduplicated list of the terms which appear; i.e. no matter
how many times A appears, write down only one A.
If a term and its complement both appear in the list, e.g. both A and , delete both
from the list.
For each list, write the Boolean product of the remaining terms.
Write the Boolean sum of the products from Step 5; this is the simplified expression.
Karnaugh Maps for Expressions of
Two Variables
Example 1:
Simplify the above expression ( AB AB ) using K Map.
Solution:
Draw a rectangle and divide it so that there is a row or column for
each variable and its complement.
Place checks in the boxes that represent each of the product terms
of the expression.
Draw a loop around adjacent pairs of checks.
A
B
0 1
0
1
1
1

The loop contains A, B, A, and B . We remove one A so that the list is


unduplicated. The B and B "cancel," leaving only A, which is the
expected result: AB AB A .
Example 2
simplifyAB AB AB
Solution
Place a check in the area.
Place a check in the area.
Place a check in the area.
Draw loops around pairs of adjacent checks.

Because there are two loops, there will be two terms in the simplified
expression. The vertical loop contains A , B, A , and B . We remove one
A to make an unduplicated list. The B and B cancel, leaving the

remaining A . From the horizontal loop we remove the duplicate B , then


remove A and A leaving only B in the second term. We write the
Boolean sum of these, and the result is A B , so: AB AB AB A B
Expressions of Three Variables
For expression of three variables, the basic Karnaugh diagram is shown
below.

As with the diagram for two variables, adjacent squares


differ by precisely one literal. The left and right edges are
considered to be adjacent, as though the map were wrapped
around to form a cylinder.
Example 3
Minimise the following problems using the Karnaugh maps
method.
(a) Z = f(A,B,C) = + B + AB + AC
(b) Z = f(A,B,C) = B + B + BC + A
Answer.
Z = f(A,B,C) = + B + AB + AC
= ABC ABC+ABC ABC+ABC+ABC
(000 010 011 110 101 111)
Example 3(cont.)
(The sequence must be kept as 00 01 11 10 so that only one
variable changed each time)
By using the rules of simplification and ringing of adjacent
cells in order to make as many variables redundant, the
minimised result obtained is +B + AC.
The first rectangle is ABC ABC AC(B+B) AC
The second rectangle is ABC+ABC ABC+ABC=AB+AB=B
The third rectangle is ABC+ABC=AC
Four-Variable Karnaugh Maps
(Example 4)
Given the following 4-input Boolean expression
F ( A, B, C , D) A BC D A BCD ABC D ABC D ABCD ABCD AB CD AB CD...

Simplify it using K-map.


Answer:

RULE: Minimization is achieved by drawing the smallest


possible number of circles, each containing the largest
possible number of 1s.
Four-Variable Karnaugh Maps
Example 4(cont.)
Grouping the 1s together results in the following.
AB C
CD
00 01 11 10
00

01 1 1
B
1 1 1 1
11
A
1 1
10

The expression for the groupings above is


Q = BD + AC + AB
This expression requires 3 2-input and gates and 1 3-input or
gate.
We could have accounted for all the 1s in the map as shown
below, but that results in a more complex expression requiring a
more complex gate.
Four-Variable Karnaugh Maps
Example 4(cont.)

C BD
AB
CD
00 01 11 10
00

01 1 1
B
1 1 1 1
11
A
1 1
10

D AC
ABCD

The expression for the above is BD AC ABCD '. This requires 2, 2-input and gates, a 4-input
and gate, and a 3 input or gate. Thus, one of the and gates is more complex (has two additional
inputs) than required above. Two inverters are also needed.
Example 5

shows deriving a circuit from the truth table using the sum of products method, simplifying the
sum of products expression, and drawing the new, simpler circuit.
Figure 1. a) A truth table with product terms, b) the resulting sum-of-products expression (min
terms), and c) the equivalent digital logic circuit.
Example 5(cont.)
The Karnaugh map for the expression in Figure 1 b is shown below. In
this Karnaugh map, the large loop surrounds ABC and ABC ; note that it
"wraps around" from the left edge of the map to the right edge. The A
and A cancel, so these two terms simplify to BC.

ABC is in a cell all by itself, and so contributes all three of its terms to the
final expression. The simplified expression is BC ABC . Simplified
circuit is shown in Figure 2.

Figure 2. Simplified circuit for the truth table of Figure 4a.


Example 6:
Generate a sum of product expression from the truth table in
Figure 3a, simplify it using K - Map and draw a simpler circuit.
Figure 3: a) A truth table with product terms, b) the resulting
sum-of-products expression, and c) the equivalent digital logic
circuit.
Figure 4 shows the K-Map of the expression.

Figure 4: Karnaugh map for the expression of figure 7


After removing duplicates, the large loop contains A and A and
also C and C ; these cancel. All that's left after removing the two
complement pairs is B. The small loop contains B and B , which
are removed, so it yields AC. The simplified expression in
Figure 6b is B AC

Você também pode gostar