chapt3 logic

Upload: jeremy-green

Post on 02-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Chapt3 Logic

    1/56

    TABLE OF CONTENTS

    3. BOOLEAN FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

    3.1 Example Logic Circuit Problem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13.2 Boolean Algebra. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

    3.3 Truth Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-63.4 Minterms and Maxterms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-73.5 Forming a Truth Table from a Boolean Expression. . . . . . . . . . . . . . . . . . . . . . 3-123.6 Karnaugh Map Preliminaries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-153.7 Karnaugh Maps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-173.8 Karnaugh Map Simplification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-223.9 Formalizing Simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-293.10 Product of Sums Simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-273.11 Maps with Don't CareEntries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-273.12 Variable Entered Maps (VEMs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-273.13 Forming a VEM from a Truth Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-273.14 VEM Map Grouping Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-363.15 VEMs with More Than One Entered Variable . . . . . . . . . . . . . . . . . . . . . . . . . 3-45Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-50

  • 8/11/2019 Chapt3 Logic

    2/56

    3-1

    3. BOOLEAN FUNCTIONS

    3.1 Example Logic Circuit Problem.

    Let's look at a simple example of a problem we might want to solve with a logic circuit.Suppose we want to launch a missile from a launch facility. The decision to launch is partlyunder the control of a launch safety officer (called S), who usually signifies a launch readycondition by switching on a launch ready switch. Suppose we do not entirely trust the launchsafety officer, so we assign two other individuals to help him. Call these individuals A and B.These individuals also have switches to indicate a launch ready condition, but we give theseindividuals less authority than the launch control officer. If either A or B signifies a launch readycondition and the launch control officer also signifies a launch ready condition, then we have alaunch ready condition.

    The type of problem described is a very simple logic circuit problem. To design a logiccircuit which will perform the operations described in the problem, we will first describe these

    operations in an equation. A possible equation to describe a launch ready condition might be

    L = (A or B) and S

    Note that we need some way to describe switch on conditions for A, B, and S and we needsome operators to tell us the relationship between the various switch on conditions and thelaunch ready condition.

    Once we have an equation to describe a launch ready condition, we need to design anelectronic circuit which will perform the operations described by the equation. In this chapter,we'll develop the mathematics needed to describe logic circuits. In the next chapter we'll showhow to turn this description into an electronic circuit. The circuits we design from the logicexpressions developed in this chapter will be simple or complex depending on whether the logicexpressions are simple or complex. There are a number of sound engineering reasons for

    producing simple designs. Some of these reasons are cost, ease of construction, speed, andeven aesthetics. We will therefore devote a portion of this chapter to developing methods forsimplifying logic expressions and becoming proficient in using these methods so we canproduce simple logic circuits.

    3.2 Boolean Algebra.

    Boolean algebra is an algebra in which all variables and relations are two-valued. SinceBoolean algebra was first developed to deal with logical propositions which could be trueorfalse,these are the two values a variable or relation can have in this algebra. These values arenormally written as 1 and 0 with one (1) representing trueand zero (0) representing false. If Xis a Boolean variable then

    X = 0

    means X is false, and

    X = 1

    means X is true.

  • 8/11/2019 Chapt3 Logic

    3/56

    3-2

    Boolean algebra has three operators:

    1. The unitary operator notwhich is given the symbol overbar. Thus, for the Booleanvariable A,A means not Aand is read as not A. The notoperator is also called thecomplement so Ais the complement ofA. The notoperator is defined by the relations:

    1 = 0 (3.2-1)

    0 = 1 (3.2-2)

    2. The binary operator andwhich is given the symbol "@" The andof the Boolean variablesXand Yis writtenX@Y. Usually, if the meaning is clear, the "@" is omitted and X@Yiswritten as XY. We'll follow this latter notation. The andoperator is defined by therelations:

    0A0 = 0 (3.2-3)0A1 = 0 (3.2-4)1A0 = 0 (3.2-5)1A1 = 1 (3.2-6)

    3. The binary operator orwhich is given the symbol "+". The orof the Boolean variables Xand Yis written X + Y. The oroperator is defined by the relations:

    1 + 1 = 1 (3.2-7)1 + 0 = 1 (3.2-8)0 + 1 = 1 (3.2-9)0 + 0 = 0 (3.2-10)

    Notice that in the definitions of the operators, the result of the operator operating on everypossible combination of values can be explicitly given. This is characteristic of Booleanalgebra.

    The relations which define the andoperation are duals of the relations which define theoroperation. This means that the one relation can be formed from the other relation by

    changing ones (1) to zeroes (0), zeroes (0) to ones (1), pluses (+) to dots (A

    ), and dots (A

    ) topluses (+).

    The above definitions allow us to write the following identities for the variable X.

    1 + X = 1 0AX = 0 (3.2-11) 0 + X = X 1AX = X (3.2-12)

    X + X = X XAX = X (3.2-13)X + X = 1 XAX = 0 (3.2-14)

    X = X (3.2-15)

    To prove these identities, we can try every possible value of the variable Xand show that theequality is true for every value. For example, if we substitute 1 for Xin the first identity,

    1 + 1 = 1

    and if we substitute 0 forX,

    1 + 0 = 1

    so the identity is true.

  • 8/11/2019 Chapt3 Logic

    4/56

    3-3

    The commutative and distributive laws hold for this algebra.

    Commutative

    X + Y = Y + X (3.2-16)XY = YX (3.2-17)

    Distributive

    X + (YZ) = (X + Y)(X + Z) (3.2-18)X(Y + Z) = (XY) + (XZ) (3.2-19)

    Notice that the algebra is distributive with respect to bothorand and. Regular algebra fornumbers is distributive only with respect to multiplication. We'll sometimes write expressionslike these distributive rules without some of the parentheses as,

    X + YZ = (X + Y)(X + Z)X(Y + Z) = XY + XZ

    When there are no parentheses, the order of operations is andbefore or.

    The following three theorems will be useful for simplifying logic expressions Absorption, Logic Adjacency, and DeMorgan's Theorem. These theorems can be proved byusing the commutative and distributive laws and the identities above; or, if all else fails, theycan be proved by substituting all possible values for the variables and showing that the relationis always true.

    Absorption:

    X + XY = X (3.2-20)X(X + Y) = X (3.2-21)

    Logic Adjacency:

    XY + XY = X (3.2-22)(X + Y)(X + Y) = X (3.2-23)

    The logic adjacency theorem is the basis of most simplification. The absorption theorem is justa special case of logic adjacency.

    De Morgan's Theorem:

    X + Y = XY (3.2-24)XY = X + Y (3.2-25)

    De Morgan's Theorem can be generalized for any expression. The complement of anyexpression is equal to the expression with each of the variables complemented and + replacedby and replaced by +, throughout. For example,

    A + BC = A + (BC) = A(B + C)(A + B)(C + D) = (AB) + (CD)

  • 8/11/2019 Chapt3 Logic

    5/56

    3-4

    Example 3.2-1

    Prove the Absorption Theorem

    X + XY = XX(X + Y) = X

    Proof:

    Using first the identity (3.2-12), then the distributive law (3.2-19), andfinally the identities, (3.2-11) and (3.2-12), we find that

    X + XY = XA1 + XY = X(1 + Y) = X1 = X

    Using first the identity (3.2-12), then the distributive law (3.2-18), andfinally the identities, (3.2-11) and (3.2-12), we find that

    X(X + Y) = (X + 0)(X + Y) = X + (0 AY) = X + 0 = X

    Notice that the second proof is the exact dual of the first.

    Example 3.2-2

    Prove that

    AB + BC + CA = (A + B)(B + C)(C + A)

    Using the distributive law (3.2-19) and the absorption theorem (3.2-20) tomanipulate the right side of the expression, we find that

    (A + B)(B + C)(C + A) = (A(B + C) + B(B + C))(C + A) = (AB + AC + BB + BC)(C + A) = (AB + BB + AC + BC)(C + A) = (AB + B + AC + BC)(C + A) = (B + AC + BC)(C + A) (XY + X = X) = (B + AC)(C + A) = BC + BA + ACC + ACA = BC + BA + AC + AC

    = BC + BA + AC = AB + BC + CA

    Example 3.2-3

    Prove De Morgan's Theorem

    X + Y = XYXY = X + Y

    We will prove these equalities by substituting all possible values of thevariables. For the first expression,

    X + Y = 0 + 0 = 0 = 1 = 1A1 = 0A0 = XY

    X + Y = 0 + 1 = 1 = 0 = 1A

    0 = 0A

    1 = XY

    X + Y = 1 + 0 = 1 = 0 = 0A1 = 1A0 = XY

    X + Y = 1 + 1 = 1 = 0 = 1A1 = 0A0 = XY

    This expression is true for all possible values of X and Y. For the secondexpression,

  • 8/11/2019 Chapt3 Logic

    6/56

    3-5

    XY = 0A0 = 0 = 1 = 1 + 1 = 0 + 0 = X + Y

    XY = 0A1 = 0 = 1 = 1 + 0 = 0 + 0 = X + Y

    XY = 1A0 = 0 = 1 = 0 + 1 = 1 + 0 = X + Y

    XY = 1A1 = 1 = 0 = 0 + 0 = 1 + 1 = X + Y

    Example 3.2-4

    Smplify the expression, AB + ABC + ABC.

    If we expand the first term using logic adjacency,

    AB + ABC + ABC = AB(C + C) + ABC + ABC = ABC + ABC + ABC + ABC

    Now we can use logic adjacency, XY + XY = X with BC = X and A = Y, to combinethe first and fourth term,,

    ABC + ABC = BC

    and, XY + XY = X with AC = X and B = Y, to combine the second and third terms

    ABC + ABC = AC

    so

    AB + ABC + ABC = BC + AC

    Example 3.2-5

    Simplify the expression, BCD + BCD + ACD.

    In this simplification, if we just combine the first two terms using logic

    adjacency (shown graphically), we will not get the simplest expression. ( XY +XY = X with CD = X and B = Y

    BCD + BCD + ACD = CD + ACD

    To simplify further, we need to expand the first term in A and A, and thensimplify,

    CD + ACD = ACD + ACD + ACD = AC + CD

    Example 3.2-6

    Simplify the expression, A + B + C + ABC

    To simplify here, we use DeMorgan's Theorem,

    A + B + C + A + B + C = 1

  • 8/11/2019 Chapt3 Logic

    7/56

    3-6

    A B S L

    0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 01 1 1 1

    A B C D F2

    0 0 0 0 00 0 0 1 10 0 1 0 10 0 1 1 00 1 0 0 00 1 0 1 10 1 1 0 10 1 1 1 0

    1 0 0 0 01 0 0 1 11 0 1 0 11 0 1 1 01 1 0 0 11 1 0 1 01 1 1 0 01 1 1 1 1

    3.3 Truth Tables.

    Boolean functions are functions of Boolean variables which can have the values true (1)and false (0), depending on the values of the variables. Since we can enumerate allcombinations of the values of the variables in a function, we can define a function by using atable of all possible combinations of variables and the resulting function value. Consider the

    example of Section 3.1. The truth table for this function is,

    Notice that in this table we list all possible combinations of the variablesA, B, and S. An easyway to do this is to list the binary numbers from 0 to 7. For each combination of variables, wedecide from the description of the problem whether or not the launch condition (L) is true andenter a 1 or a 0 accordingly. The launch condition is only true if Aand Sare true, if Band Saretrue, or if A, B, and Sare all true.

    For another example of truth tables, consider the addition of two 2-bit binary numbers,

    C AD BF2 F1

    where A, B, C, and Drepresent the bits of the numbers to be added, and F1and F2representthe bits of the sum. Here we need two truth tables to define the functions F1and F2. The first is

    a function of the two binary variables A and B. The second is a function of the four binaryvariables A, B, C, and D because of the carry from the low to high order bits.

  • 8/11/2019 Chapt3 Logic

    8/56

    3-7

    A B F1

    0 0 00 1 11 0 11 1 0

    A B F0 0 10 1 01 0 01 1 1

    A B Minterms

    0 0 m0= AB

    0 1 m1= AB1 0 m2= AB1 1 m3= AB

    In these two examples, we've seen how to define a function using a truth table. Here,we produced the tables directly from the specifications of the problem. If the specificationsdescribe a design, then the truth tables are a way of describing the logic functions needed inthe design. They are often the start of the design process.

    Sometimes we want to form a truth table to describe a Boolean expression or function.Before we do this, however, we'll first show how to formulate a Boolean expression to representa function described in a truth table.

    3.4 Minterms and Maxterms.

    Any Boolean function can be written in terms of simple expressions called mintermsandmaxterms. This is done most easily from the truth table for the function. Consider a simpletruth table for a two variable function, F.

    This truth table contains four entries (rows) and the minterms for each of these entries isformed by andingA and B or their complements A and B in such a way that the mintermexpression formed for that entry is true (1). For instance, the minterm for the first entry in thetable,

    m0= AB,

    is true (1) when A = 0 and B = 0. The minterms are given the symbol mi, i = 0 through n-1,where n is the number of entries in the table. Forming the remaining minterms allows us toconstruct a table of minterms.

    Checking these minterms, we can see that if the values for the variables on the left aresubstituted into the minterm expression, the expression is true (1).

  • 8/11/2019 Chapt3 Logic

    9/56

    3-8

    A B Maxterm

    0 0 M0= A+B0 1 M1= A+B1 0 M2= A+B1 1 M3= A+B

    Now that we have the minterms, an expression for the function is easily formed by oringtogether the minterms for which the functionis true (1). This form of the function is called theSum Of Products (SOP). In our example, the function is given by

    F = AB + AB.

    Notice that there is a minterm for each of the entries in the truth table, but to form an expression

    for a function, we ortogether only those minterms for which the function is true (1).

    We can also write an expression for a function in terms of maxterms. To form themaxterms corresponding to the entries in the two variable truth table, we complement theminterms. Thus the maxterm corresponding to m0is

    M0 = AB = A+B.

    The maxterm expressions formed in this way are false (0) when the variable values from thatrow are substituted in the expression. If we complement all the minterms, we can form a table ofmaxterms.

    The maxterms are labeled M0, M1, M2, and M3. Now to see how to write an expression in termsof maxterms, we first write the complement of the function in terms of minterms. For theexample function F (above),

    F = AB + AB.

    If we complement this expression we obtain,

    F = (A+B)(A+B).

    But this last expression shows us how to write the function directly in terms of maxterms. Wesimply andthe maxterm expressions for which the function is 0. This form of the function iscalled the Product Of Sums (POS). Notice that like the minterms, there is a maxterm for eachentry in the truth table, but onlythe maxterms for which the function is false (0) are used inwriting the maxterm expression for the function.

    Minterms and maxterms can be formed for any number of variables. Below are tables ofminterms and maxterms for three and four variables.

    Three variable minterms and maxterms,

  • 8/11/2019 Chapt3 Logic

    10/56

    3-9

    A B C Minterm Maxterm0 0 0 m0= ABC M0= A+B+C0 0 1 m1= ABC M1= A+B+C0 1 0 m2= ABC M2= A+B+C0 1 1 m

    3

    = ABC M3

    = A+B+C1 0 0 m4= ABC M4= A+B+C1 0 1 m5= ABC M5= A+B+C1 1 0 m6= ABC M5= A+B+C1 1 1 m7= ABC M7= A+B+C

    A B C D Minterm Maxterm0 0 0 0 m0 = ABCD M0 = A+B+C+D0 0 0 1 m1 = ABCD M1 = A+B+C+D

    0 0 1 0 m2 = ABCD M2 = A+B+C+D0 0 1 1 m3 = ABCD M3 = A+B+C+D0 1 0 0 m4 = ABCD M4 = A+B+C+D0 1 0 1 m5 = ABCD M5 = A+B+C+D0 1 1 0 m6 = ABCD M6 = A+B+C+D0 1 1 1 m7 = ABCD M7 = A+B+C+D1 0 0 0 m8 = ABCD M8 = A+B+C+D1 0 0 1 m9 = ABCD M9 = A+B+C+D1 0 1 0 m10= ABCD M10= A+B+C+D1 0 1 1 m11= ABCD M11= A+B+C+D1 1 0 0 m12= ABCD M12= A+B+C+D1 1 0 1 m13= ABCD M13= A+B+C+D1 1 1 0 m14= ABCD M14= A+B+C+D

    A B C F

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

    Four variable minterms and maxterms,

    Remember that we form the mintermfor any row by andingtogether all the variableswhich are true (1) in that row and the complements of all the variables which are false (0) in thatrow. We form the maxtermfor any row by oringtogether all the variables which are false (0) inthat row and the complements of all the variables which are true (1) in that row.

    Example 3.4-1

    Write the function defined by the truth table in terms of minterms (sum ofproducts) and maxterms (product of sums).

    We can express this function in minterms (sum of products) as,

    F = ABC + ABC + ABC + ABC

  • 8/11/2019 Chapt3 Logic

    11/56

    3-10

    A B C D F0 0 0 0 10 0 0 1 10 0 1 0 10 0 1 1 10 1 0 0 00 1 0 1 00 1 1 0 10 1 1 1 11 0 0 0 0

    1 0 0 1 01 0 1 0 01 0 1 1 01 1 0 0 11 1 0 1 11 1 1 0 11 1 1 1 1

    Note that we can simplify this expression (using logic adjacency) to,

    F = ABC + ABC + ABC + ABC

    F = AB + AB = B

    We can express this function in maxterms (product of sums) as,

    F = (A + B + C)(A + B + C)(A + B +C)(A + B + C)

    Note that we can also simplify this expression (using logic adjacency) to,

    F = (A + B + C)(A + B + C)(A + B + C)(A + B + C)

    F = (A + B)(A + B) = B

    In this example the sum of products and product of sums expressions reduce tothe same expression. Sometimes they reduce differently and one is simplerthan the other.

    Example 3.4-2

    Write the function defined by the truth table in terms of minterms (sum ofproducts) and maxterms (product of sums).

    We can express this function in minterms (sum of products) as,

    F = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

    + ABCD + ABCD + ABCD + ABCD

    Note we can simplify this sum of products expression (using logic adjacency)to,

    F = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

    + ABCD + ABCD + ABCD + ABCD

  • 8/11/2019 Chapt3 Logic

    12/56

    3-11

    A B CI S CO

    0 0 0 0 00 0 1 1 00 1 0 1 0

    0 1 1 0 11 0 0 1 01 0 1 0 11 1 0 0 11 1 1 1 1

    = ABC + ABC + ABC + ABC + ABC

    = AB + BC + AB

    We can express this function in maxterms (product of sums) as,

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

    Note that we can also simplify this sum of product expression(using logicadjacency) to,

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

    = (A + B + C)(A + B + C)(A + B + C)

    = (A + B + C)(A + B)

    In this example, the simplified sum of product and product of sums expressions

    are different, although with enough work we could show that they're the same.Sometimes, we want to look at the two different simplified expressions becauseone may result in a simpler circuit than the other.

    These examples show us how to form a logic expression for a function from its truthtable, but we can do much more than this. We can complete the initial steps in a logic design.We start with a word description of the system we would like to design; from the worddescription, we make a truth table or truth tables; and from the truth table or tables we form alogic expression or logic expressions which describe the design.

    Example 3.4-3

    Design the logic for a 1-bit full adder which performs the following binaryaddition

    CI A +BCO S

    where we add the 1-bit numbers A, B, and CI (carry in) to get the sum S andthe carry out (CO).

    First, we make a truth table for S and CO.

  • 8/11/2019 Chapt3 Logic

    13/56

    3-12

    A B C F

    0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1 1

    In this table, the first line tells us that 0 + 0 + 0 = 0; the second tells usthat 0 + 0 + 1 = 1; and so on. Note that the fourth line tells us that 0 + 1+ 1 = 10, zero (0) with a carry out of 1.

    Now, we write the logic expression for S in terms of minterms

    S = A B CI + A B CI + A B CI + A B CI

    and the logic expression for CO in terms of minterms

    CO = A B CI + A B CI + A B CI + A B CI

    We can simplify this last expression using logic adjacency

    CO = A B CI + A B CI + A B CI + A B CI

    = B CI + A CI + A B

    We could also form maxterm (POS) expressions for these functions, but for mostdesigns we will not use the maxterm expression.

    3.5 Forming a Truth Table from a Boolean Expression.

    Usually a problem comes to us in the form of a specification as in section 3.3, butsometimes we have a Boolean expression for a function and we want to find its truth table. If thefunction is written in minterms (or maxterms), we reverse what we did in the last section. Forexample, if

    F = ABC + ABC + ABC + ABC

    then the truth table is

  • 8/11/2019 Chapt3 Logic

    14/56

    3-13

    A B C F

    0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1 1

    A B C F

    0 0 0 00 0 1 00 1 0 10 1 1 0

    1 0 0 01 0 1 01 1 0 11 1 1 1

    where we've placed a 1 in the truth table for each row corresponding to a minterm in thefunction, and a 0 in all other rows. To form a truth table for a function written in maxterms, theprocess is almost identical. For example, if

    F = (A + B + C)(A + B + C)(A + B + C)(A + B + C)

    then the truth table is,

    where we've placed a 0 in the truth table for each row corresponding to a maxterm in thefunction, and a 1 in all other rows.

    Now suppose we have a function which is not written in minterms (or maxterms). Forinstance, the function might be the sum of products expression,

    F = AB + BC

    This three variable function is obviously not expressed in minterms because minterms for a threevariable function each have three variables. To see what to do here, expand each of the terms

    into minterms using logic adjacency,

    AB = ABC + ABC

    BC = ABC + ABC

    so

    F = ABC + ABC + ABC + ABC

    and the truth table is

  • 8/11/2019 Chapt3 Logic

    15/56

    3-14

    A B C F

    0 0 0 00 0 1 00 1 0 10 1 1 0

    1 0 0 11 0 1 11 1 0 11 1 1 1

    A B C F

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

    Notice that two of the minterms in the function are the same, but sinceABC + ABC = ABC, thispresents no problem and only results in one row of the truth table being set to 1.

    Now, we can discover an easier way to write the truth table. In the above example, thefirst term AB results in a 1 in the truth table in every row for which A = 1 and B = 1 independentof the value of C (rows 6 and 7, taking the first row as 0). The term BC results in a 1 in the truthtable in every row for which B = 1 and C = 0, independent of the value of A (rows 2 and 6). The

    pattern is simple: for any term in the expression, place a 1 in the truth table for each row forwhich that term is true (1). To see further how this works suppose,

    F = A + BC

    The A results in a 1 in the truth table for each row in which A = 1, and the BC results in a 1 in thetruth table for each row in which B = 1 and C = 0. Thus, the truth table is

    If a function is written as a product of sums, a similar procedure can be applied toproduce the truth table. The procedure is the dual of the above. For example, suppose

    F = (A + B)C

    Here we put a 0 into the truth table for each row in which a factor in the expression is false (0).The first factor A + B is false (0) when A = 1and B = 0. The second factor is false (0) when C= 0. Thus, the truth table is

    Example 3.5-1

    Form the truth table for the function expressed as,

    F = (A + B)(CD + BC)

  • 8/11/2019 Chapt3 Logic

    16/56

    3-15

    A B C D F0 0 0 0 00 0 0 1 00 0 1 0 00 0 1 1 00 1 0 0 00 1 0 1 00 1 1 0 10 1 1 1 11 0 0 0 01 0 0 1 01 0 1 0 11 0 1 1 01 1 0 0 01 1 0 1 01 1 1 0 1

    1 1 1 1 1

    Here we have a mixed expression which is neither sum of products nor productof sums. Using the law of distribution, we can expand it into a sum ofproducts,

    F = ACD + ABC + BCD + BC

    and the truth table is

    3.6 Karnaugh Map Preliminaries.

    We've been simplifying Boolean expressions using logic adjacency. This requires someingenuity and it's not always clear that we have found the simplest expression. In this andsucceeding sections, we'll develop a graphical technique for simplifying Boolean expressionswhich always results in the simplest expression being found. Computer programs exist whichwill also simplify logic expressions and in design problems we will often use computer toolswhich include these programs. However, it is worthwhile to look at the graphical techniques togive us a feel for what the computer programs do and see how a design is done without the aidof computer programs.

    To see how to use this graphical technique, first consider a two variable Booleanfunction. If we write all the possible minterms for this function in an array of the form

    AB ABAB AB

    then all the logic adjacent terms are next to each other, or next neighbor, (both side to side andup and down). AB is logic adjacent to AB, AB is logic adjacent to AB, AB is logic adjacent to ABand finally AB is logic adjacent to AB Now suppose we have a function expressed as,

    F = AB + AB

    and we put these terms into the array

    0 0AB AB

    We can immediately see the logic adjacency, and the expression simplifies to,

    F = B

  • 8/11/2019 Chapt3 Logic

    17/56

    3-16

    The graphical technique is rather trivial for two variable functions. We can easily see thelogic adjacencies in these simple functions without the array, but now consider three variablefunctions. For a three variable function, if we arrange the possible minterms into the array,

    ABC ABC ABC ABCABC ABC ABC ABC

    we find that we've arranged all the minterms so that logic adjacent terms are next to each other(both side to side and top to bottom) and in addition we have logic adjacency across the ends.Now if we have a function expressed as,

    F = ABC + ABC + ABC

    and if we put it in the array,

    0 ABC ABC 00 0 ABC 0

    we can immediately see the logic adjacencies (one side to side and one top to bottom) and theexpression for the function simplifies to,

    F = BC + AB

    In this simplification we used the term ABC twice. Note that in simplifying the function, thecommon terms in the logic adjacent pairs remain.

    An even more interesting simplification results with the function expressed as,

    F = ABC + ABC + ABC + ABC

    If we put it in the array,

    0 ABC ABC 00 ABC ABC 0

    four terms group together in a square. Now when we simplify these terms we get,

    F = ABC + ABC + ABC + ABC = BC + BC = B

    Four terms grouped together in a square gives a double simplification. The only variable whichremains in the simplified expression for the square is that variable which is common throughoutthe square (B). Both the variables A and C appear uncomplemented and complemented.

    The idea of placing logic adjacent minterms next to each other can be extended to fourvariable functions using the array,

    ABCD ABCD ABCD ABCD

    ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD ABCD

    In this array all the neighbor elements are logic adjacent side to side and up and down. Inaddition, they're logic adjacent around the ends and from the top to the bottom. Suppose wehave the four variable function expressed as,

  • 8/11/2019 Chapt3 Logic

    18/56

    3-17

    F = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

    If we put it into the array,

    ABCD ABCD ABCD ABCD0 0 ABCD ABCD0 0 0 0

    0 0 0 0

    we find we have a group of four logicadjacent terms in a square (upper rightcorner) and, since a group of fourterms in a column or row are logicadjacent just like a square, a group offour logic adjacent terms in a row (toprow). With these groupings, we can immediately simplify the expression for thefunction to,

    F = CD + AC

    Note that for logic adjacent groups, only the variables which are commonthroughout the group remain in the simplification. In a four variable array it'spossible to get a grouping of eight logic adjacent terms in a rectangle whichcan be reduced to a single variable. In the array,

    ABCD ABCD ABCD ABCDABCD ABCD ABCD ABCD0 0 0 00 0 0 0

    the eight logic adjacent terms in the rectangle reduce to C (the common variable).

    F = ABCD + ABCD + ABCD + ABCD

    + ABCD + ABCD + ABCD + ABCD = ACD + ACD + ACD + ACD

    = CD + CD = C

    3.7 Karnaugh Maps.

    Using the idea of an array of next neighbor, logic adjacent minterms described in the last

    section, Karnaugh developed an easy graphical method of simplifying Boolean functions.Rather than write out all the minterms, we used what has become known as a Karnaugh maptoshow the minterm relations. The Karnaugh map for a two variable function has the form shownin Figure 3.7-1.

    Each square or cell in the map represents a minterm in the variables A and B. The valueof one of the variables associated with a cell is given above the cell and the value of the othervariables associated with the cell is given to the left of the cell. Variable names are shown

    Figure 3.7-1

    Figure 3.7-2

  • 8/11/2019 Chapt3 Logic

    19/56

    3-18

    Figure 3.7-4.

    Figure 3.7-5.

    above and below a diagonal line at the upper left hand corner of the map. Here the columnvariable is A and the row variable is B. The number of the minterm associated with a cell isgiven in the upper left hand corner of the cell. For example, in this map, the minterm associatedwith the upper left hand cell is m0= AB, the term which is true if A = 0 and B = 0.

    To show the minterm relationships for a function in a Karnaugh map, we put a 1 in eachcell which is a minterm of the function and a 0 in each of the other cells. For example, the

    Karnaugh map for the function,

    F = AB + AB

    is shown in Figure 3.7-2. This function has no simplification. There are no minterms withneighbors.

    The Karnaugh map for a three variable function has the form shown in Figure 3.7-3. Inthis map each column has two variables associated with it. The values for the two variables areshown at the top of the column and the variable names (A and B) are shown above the diagonalin the upper left corner. Eachrow has only one variable (C)associated with it as in the twovariable map.

    The minterm relationshipsfor a function are shown in thethree variable map in the sameway as in a two variable map.For each minterm in the function,a 1 is entered in the cellcorresponding to that mintermand a 0 is entered in each of theother cells. For example, the Karnaugh map for the functionexpressed as,

    F = ABC + ABC + ABC + ABC

    is shown in Figure 3.7-4. This map has a grouping of four mintermsbecause of the logic adjacency across the ends of the map, so thesimplified expression for thefunction is,

    F = B

    since B is the commonvariable (B = 0) in all theterms of the group.

    The Karnaugh mapfor a four variable function

    has the form shown in Figure3.7-5. In this map bothcolumns and rows have twovariables associated withthem. The mintermrelationships of a functionare again shown by placinga 1 in each cell representing

    Figure 3.7-3

  • 8/11/2019 Chapt3 Logic

    20/56

    3-19

    Figure 3.7-7.

    Figure 3.7-6.

    a minterm in the function and a 0 in each of the other cells. For example, the Karnaugh map forthe function expressed as,

    F = ABCD + ABCD + ABCD + ABCD + ABCD + ABCD

    is shown in Figure 3.7-6. The map has a grouping of four logicadjacent minterms in a square and a pair of logic adjacent minterms

    which simplify to,

    F = BC + ACD

    In all the above examples, we found the Karnaugh map for afunction expressed as a sum of products involving only minterms.Suppose we have a function which is not expressed in mintermssuch as,

    F = A + ABD

    We can expand each term of the function into minterms using logic adjacency,

    F = AB + AB + ABCD + ABCD

    = ABC + ABC + ABC + ABC + ABCD + ABCD

    = ABCD + ABCD + ABCD + ABCD

    + ABCD + ABCD + ABCD

    + ABCD + ABCD +ABCD

    and then we can form the Karnaugh map just as we did in our firstdevelopment. The map for the above function is shown in Figure3.7-7.

    However, there is a simpler way to form the map. The first term of our function (A)expands into four minterms, all of which contain A, resulting in a 1 in all the cells with A = 1. Thesecond term of our function (ABD) expands into two minterms, all of which contain ABD,resulting in a 1 in all the cells with A = 0, B = 0, and D = 1. To fill the Karnaugh map for afunction which is a sum of products, look at the terms one at a time and place a 1 in each cell forwhich the term is true. Notice that the procedure for filling a Karnaugh map and the procedurewhich we learned for forming a truth table are similar.

    Example 3.7-1.

    Form a Karnaugh map for the function expressed as,

    F = AB + CD

    From the first term of the function, we fill all the

    cells of the map which have A = 1 and B = 1. From thesecond term, we fill all the cells which have C = 0and D = 0.

    Example 3.7-2

    Form a Karnaugh map for the function expressed as,

  • 8/11/2019 Chapt3 Logic

    21/56

    3-20

    Figure 3.7-8.

    A B F

    0 0 10 1 11 0 01 1 1

    Figure 3.7-10.

    A B Minterm

    0 0 m00 1 m11 0 m21 1 m3

    Figure 3.7-9.

    F = ABC + AC

    From the first term, we fill all the cells of the mapwhich have A = 0, B = 0, and C = 0. From the secondterm, we fill all the cells which have A = 1, andC = 1.

    Now suppose we have a function which is expressed as asum of products. We can form the Karnaugh map by using the dual ofthe above idea. Consider the example,

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

    The Karnaugh map is shown in Figure 3.7-8. Here we consider onefactor at a time and we fill the cells for which that factor is false withzeros. The first factor is false when A = 0 and C = 1, the second isfalse when A = 1 and D = 0, and the third is false when B = 0 and C =0.

    Example 3.7-3

    Form the Karnaugh map for the function,

    F = A(A + B + C)

    For the first factor, we fill all the cells in the mapfor which A = 1 with 0s. For the second factor, we fillall the cells for which A = 0, B = 0, and C = 1 with 0s.

    One of the simplest ways to find the Karnaugh map of afunction is from the truth table for the function. Each minterm in the truth table corresponds to acell in the Karnaugh map. For the two variable function, this relationship is shown in Figure 3.7-9. To form the Karnaugh map we just transfer the function value in the truth table to the propercell in the map. Note that the order is down the columns. An example of a two variable truthtable and its map are shown in Figure 3.7-10.

  • 8/11/2019 Chapt3 Logic

    22/56

    3-21

    A B C Minterm0 0 0 m00 0 1 m10 1 0 m20 1 1 m31 0 0 m41 0 1 m51 1 0 m61 1 1 m7

    Figure 3.7-11.

    A B C D Minterm

    0 0 0 0 m00 0 0 1 m10 0 1 0 m20 0 1 1 m30 1 0 0 m40 1 0 1 m50 1 1 0 m60 1 1 1 m71 0 0 0 m8

    1 0 0 1 m91 0 1 0 m101 0 1 1 m111 1 0 0 m121 1 0 1 m13

    Figure 3.7-13.

    A B C F

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

    Figure 3.7-12.

    For a three variable function, the relationship between the truth table and the Karnaughmap is shown in Figure 3.7-11. Note that the order for filling the map is again down thecolumns, but the fourth column is filled before the third. As in a two variable map, the valuesfrom the truth table are transferred to the proper cell in the map. An example of a three variabletruth table and its map are shown in Figure 3.7-12.

    For a four variable function the relationship between the truth table and the Karnaughmap is shown in Figure 3.7-13. Note that the order for filling the map is again down the

  • 8/11/2019 Chapt3 Logic

    23/56

    3-22

    A B C D F

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

    1 1 0 1 01 1 1 0 01 1 1 1 0

    Figure 3.7-14.

    columns, but the fourth row is filled before the third. Also as in the three variable map, the fourthcolumn is filled before the third. An example of a four variable truth table and its map are shownin Figure 3.7-14.

    In this section we've seen how to form a Karnaugh map for a function defined by a truthtable or defined by an expression. We also looked at some examples of how the Karnaughmap helps us simplify functions. Now we need a systematic way to assure us that we're gettingthe simplest expression from the map.

    3.8 Karnaugh Map Simplification.

    We've developed the idea of a Karnaugh map for simplifying Boolean functions, but westill need a systematic way of finding the simplest expression from the map. Generally, what wewant to do is choose groupings such that we minimize the number of groupings required to coverall the entries in the map and at the same time maximize the size of the groupings. We can dothis by following a simple set of steps. We start with groupings of one term, then considergroupings of two terms, then four terms, and then eight. At each step, we look ahead and donot form groupings which can be completely covered by larger groupings. Our procedure is to:

    1. Search the map, considering one entry at a time, and find all those single entrieswhich cannot be grouped with any other entry. These entries are called islands.

    2. Search the map, considering each entry not previously grouped, and find all thoseentries which can be grouped in onlyone way with another single entry. Groupthese pairs of entries.

  • 8/11/2019 Chapt3 Logic

    24/56

    3-23

    3. Search the map, considering each entry not previously grouped, and find thoseentries which can be grouped in more than one way with one other entry. Forthese entries,

    (a) group together those entries which will group with one other entry notpreviously grouped

    (b) group together those entries which will group with one other entrypreviously grouped

    These steps can result in a situation where no clear choice is available. In thiscase, make one of the choices available and continue with this step.

    4. Repeat steps 2 and 3 for groupings of 4 entries.

    5. Repeat steps 2 and 3 for groupings of 8 entries.

    Let's look at some examples of this process. First look at an example which has anisland and some groupings in pairs.

    Example 3.8-1.

    Simplify the function with the Karnaugh map shown below.

    Using rule 1, we find that the entry in cell 0 cannot be grouped with anyother entry. It's an island as shown below.

    Using rule 2, we find that there are two single entries which can be groupedin only one way with another single entry. We can completely cover the map bygrouping these entries (in cells 7 and 5) as shown below.

    All that remains is to determine the simplified expression for each grouping.If we remember that variables which are common throughout the group remain inthe simplification, this is easy. The island has no simplification, and itresults in the term ABC. The grouping of cells 3 and 7 have B = 1 and C = 1

  • 8/11/2019 Chapt3 Logic

    25/56

    3-24

    common and simplifies to BC. The grouping of cells 7 and 5 have A = 1 and C= 1 common and simplifies to AC. The simplified function is thus,

    F = ABC + BC + AC

    Example 3.8-2.

    Simplify the function with the Karnaugh map shown below.

    Here we have no islands (rule 1). We do have three

    entries (cells 5, 11, and 14) which can only be groupedin one way with another entry (rule 2) as shown at theright. Note that the entry in cell 14 groups with theentry in cell 12 because of logic adjacency from the topto the bottom of the map.

    Now we're left with a group of four which completes thecovering as shown on the right (rule 2).

    We should make a final check to see that we have notcovered a grouping with a larger grouping. For example,we might have an unnecessary grouping of the entries incells 4 and 12 which are already covered by the groupingof four entries.

    Now we find the simplest expression for each group(reading the map), we get the simplified expression,

    F = ABC + ABD + ABD + CD

    The terms in this expression are in the same order as that in which we chosethe groups. For the first group (cells 4 and 5), A = 0, B = 1, and C = 0 arethe common variables. For the second group (cells 12 and 14), A = 1, B = 1,and D = 0 are the common variables. For the third group (cells 9 and 11), A =1, B = 0, and D = 1 are the common variables. For the fourth group (cells 0,4, 12, and 8), C = 0 and D = 0 are the common variables.

    Example 3.8-3.

    Simplify the function with the Karnaugh map shown below.

  • 8/11/2019 Chapt3 Logic

    26/56

    3-25

    The groupings of entries for the map are shown on theright. There are no islands (rule 1). There are fourentries which can only be grouped in one way with anotherentry (cells 0, 7, 11, and 12). These groups complete thecover. Even though the entries in cells 2, 6, 14, and 10form a group of four, this group is not used because it'scompletely covered by necessary groupings of two entries.

    Now, reading the map we get the simplified function,

    F = ABD + ABC + ABD + ABC

    Example 3.8-4.

    Simplify the function with the Karnaugh map shown below.

    The grouping of entries for the map is shown on the right.There are no islands (rule 1) and no single entries whichcan be grouped in only one way with another single entry(rule 2). In fact, all entries can be grouped in morethan one way with another entry (rule 3), but there is noway to make a choice using rules 3a or 3b, so we make aninitial arbitrary grouping. If we group the entries incells 7 and 15, then all the other groupings follow fromrule 3a. Groupings are chosen so that they cover onlypreviously uncovered entries.

    Now, reading the map we get the simplified expression,

    F = ACD + BCD + ABD

    for the function.

    The expression we get for this function will change if wechoose the initial group differently. If we initiallygroup the entries in cells 5 and 7, the minimal groups

  • 8/11/2019 Chapt3 Logic

    27/56

    3-26

    will be as shown on the right and the simplified expression for the functionis

    F = BCD + ABD + ACDIf we change this example only slightly, we break the chain and the mappingproceeds quite differently. Consider the map below.

    Here, rule 2 applies to the entry in cell 14 and thenrule 3a applies to the entries in cells 5 and 7 and

    cells 9 and 11 (see map at right). This leaves only anapplication of rule 3b which results in a choice betweenthe entries in cells 1 and 5 or 1 and 9. We can makeeither choice; not both. We'll choose to group theentries in cells 1 and 9.

    Now, reading the map we get the simplified function,

    F = ABC + ABD + ABD + BCD

    Example 3.8-5.

    Simplify the function with the Karnaugh map shown below.

    The groupings of entries for this map are shown on theright. There are no islands (rule 1). There is oneentry (cell 4) which can be grouped with another entryin only one way (rule 2). Note that entries in cells 0,1, 8, and 9 form a possible grouping of four entries andentries in cells 0, 2, 8, and 10 form another. Thecorners are logic adjacent. These groupings will coverall the remaining entries. Applying rule 2 to groupingsof 4 entries, we find that both of the groupings of fourmust be used to cover all remaining entries.

  • 8/11/2019 Chapt3 Logic

    28/56

    3-27

    Now, reading the map we get the simplified function,

    F = ACD + BC + BD

    Example 3.8-6

    Simplify the function,

    F = AB + ABD + CD

    First, we need to form a Karnaugh map for the function.Since the function is a four variable function, the mapwill be 4x4 as shown on the right.Now to fill the map, we note that the first term in thefunction generates entries (1s) in all the cells forwhich A = 0 and B = 0, the second term generates entriesin all cells for which A = 0, B = 1, and D = 1, and thethird term generates entries in all the cells for whichC = 1 and D = 1. The remaining cell are filled withzeros. The map with entries is shown below below on theleft.

    We can be cover this map with three groups of four entries as shown above onthe right (rule 2) and the function simplifies to the expression,

    F = AB + AD + CD

    Note that when we covered the map, we chose the largest possible groupings ofentries. We never choose a grouping of two entries when we can cover theseentries with a larger grouping of four entries.

    Example 3.8-7.

    Simplify the function,

    F = ABCD + CD + ABCD + BCD

    First, we need to form the Karnaugh map for thefunction as shown on the right. The first term in thefunction generates entries (1s) in all the cells forwhich A = 1, B = 1, C = 0, and D = 0 (one cell), thesecond term generates entries for all the cells forwhich C = 1 and D = 0, the third term generates entriesin all the cells for which A = 1, B = 1, C = 1, and D =1, and the fourth term generates entries in all the

  • 8/11/2019 Chapt3 Logic

    29/56

    3-28

    cells for which B = 0, C = 0, and D = 0. The remaining cells are filled withzeros.

    We can cover this map with one grouping of two entries(rule 2) and three groupings of four entries (rule 2)as shown on the right.

    The simplified function is,

    F = CD + BD + AD + ABC

    The rules for covering a map with a minimal cover are useful for getting started. Aftersome experience, we will begin fo recognized patterns in the maps and the rules will not benecessary.

  • 8/11/2019 Chapt3 Logic

    30/56

    3-29

    Figure 3.9-1.

    Figure 3.9-2.

    3.9 Formalizing Simplification.

    In the last section, we looked at methods of forming a minimal cover of a Karnaughmap. There's actually a formal structure associated with forming a minimal cover which weignored in that section. In the formal structure, different types of groupings are given differentnames. In this section we'll go back and fill in the formal structure. Suppose a function has the

    Karnaugh map shown in Figure 3.9-1. On this map we've shown all possible groupings ofentries which are not completely covered by a larger grouping. These groupings are calledprime implicants. Not all of these groupings are required to cover the map.

    Some of the prime implicants contain entries which can be grouped with other entries inonly one way. The entries in the four cells 0, 8, 1, and 9 comprise such a group since the entryin cell 9 can be grouped in only one way with three other entries. The entries in cell 0, 4, 12,and 8 are another such group since the entry in cell 4 can only begrouped in one way with three other entries. Groupings of this typeare called essential implicants.

    Some of the prime implicants contain entries which can begrouped in only one way to cover two (or more) uncovered entries.The entries in cells 3 and 7, and in 15 and 14 are groupings of thistype. Such groupings are called necessary implicants.

    Some of the prime implicants contain entries which can begrouped in more than one way but are needed to cover otherwiseuncovered entries in the map. This map has none of these, butwhen they exist they're called optional implicants.

    Finally, some of the prime implicants are not needed to cover otherwise uncoveredentries in the map. They cover entries already covered. The entries in cells 1 and 3, 7 and 15,and 12 and 14 are of this type. These are redundant implicants. Redundant implicants shouldnot be included in the minimal cover. The purpose of our rules in the last section was toexclude these redundant implicants.

    Now let's look at a Karnaugh map which contains optionalimplicants. Consider the map in Figure 3.9-2. All the primeimplicants are shown on the map, and all the prime implicants arealso optional implicants. They can all be chosen in two differentways. Here we have to make a choice and once this choice is madethe other implicants are then either necessary implicants orredundant implicants. If we choose the grouping of the entries incells 0 and 1 as an optional implicant, then the groupings in cells 5and 7 and in cells 2 and 6 are necessary implicants and this set ofimplicants completely covers the map.

    To summarize, we see that all the groupings which are notcompletely covered by a larger grouping are called prime implicants. The set of all primeimplicants consists of essential implicants, necessary implicants, optional implicants, and

    redundant implicants. Our purpose in finding a minimal covering for a map is to find all theessential, necessary, and optional implicants.

  • 8/11/2019 Chapt3 Logic

    31/56

    3-30

    A B C F0 0 00 0 1 0

    0 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1

    Figure 3.11-1

    Figure 3.11-2A B C F

    0 0 0 x0 0 1 00 1 0 00 1 1 1

    1 0 0 01 0 1 11 1 0 11 1 1 x

    Figure 3.11-3.

    3.10 Product of Sums Simplification.

    In the previous sections we've learned how to simplify a Boolean function using aKarnaugh map. The simplification we've found is the simplest sum of products (SOP)expression for the function. There is a dual process to the one we've used which results in asimplest product of sums (POS) expression for the function. We should be aware that this is

    possible, but we will probably never have to make this type of simplification and if we do it iscovered in Appendix A.

    3.11 Maps with Don't CareEntries.

    Suppose we have a three variable function which we want to be true when two and onlytwo of the variables are true, false when one and only one of the variables is true, and eithertrue or false (don't care) for any other combination of variables. The truth table for this functionis

    where we have not assigned values to the function for those combinations of variables forwhich the function is don't care (true or false). The Karnaugh map for this function is shown inFigure 3.11-1. The map has two blank cells. These cells can be either 1s or 0s. In thisproblem, if we choose these blank cells as shown in Figure 3.11-2, we can get bettersimplification of the function because we can get bigger groupings ofentries in the map. With the groupings shown, the simplified functionis,

    F = BC + AB + AC

    In this example, we left the cells of the Karnaugh map blank to signify the don't care

  • 8/11/2019 Chapt3 Logic

    32/56

    3-31

    function. A more common way of showing this is to put a 1 and a 0 on top of each other (x) in acell which can be either 1 or 0. We use the same notation in the truth table. The truth tableand map using this notation for the example problem are shown in Figure 3.11-3. The x entriesare the don't care entries. They can be either 1 or 0 and we choose the value in the map tomake the simplest expression for the function.

    Example 3.11-1.

    Simplify the function with the Karnaugh map shown below.

    The minimal covering for the entries in this map isshown on the right. Note that we've chosen to use thedon't cares in cells 4, 9, and 10 as 1s. In each case,this choice allows us to get a larger grouping. Thesimplified expression for this function is,

    F = AC + BD + AB

    Example 3.11-2.

    Simplify the function with the Karnaugh map shown below.

    A minimal covering for the entries in this map is shownon the right. Note that we've chosen to use the don'tcares in cells 4, 5, and 10 as 1s and the don't caresin cells 9 and 11 as 0s. The simplified expression forthis function is,

    F = CD + BC + BD + ABCD

    3.12 Variable Entered Maps (VEMs).

    In a Karnaugh map, each cell represents a minterm and we enter a 1 or a 0 in the cell tospecify if the function is true (1) or false (0) for that minterm. Variable entered maps extend this

  • 8/11/2019 Chapt3 Logic

    33/56

    3-32

    Figure 3.12-1.

    Figure 3.12-2

    idea. They allow us to enter variables in the cells of a map torepresent minterms which have too many variables to benormally entered in the map. This is most readily seen with anexample. Consider the five variable function,

    F = ABCD + ABCDE + ABCDE + ABCDE

    We can represent this function in a four variable map with mapvariablesA, B, C, and Dby showing explicitly in the appropriatecells of the map the values of Eneeded to make the functiontrue (1) in that cell. The VEM for this function is shown inFigure 3.12-1. This map contains complete minterminformation about the function. Part of the information is carried by the map variables and partis explicitly entered in the cells by entering the appropriate value for E (the map enteredvariable). Note that the first term in the function is true, independent of the value of E, so weenter a 1 in the cell corresponding to this term (A = 0, B = 1, C = 1, and D = 1). The second termin the function is true for A = 0, B = 0, C = 1, and D = 1, all of which correspond to a cell in themap, but for this term to be true Emust also be true. To show this relation we enter Ein the cellcorresponding to the first four variables. We do this for the third and fourth terms also.

    To simplify this map, we use logic adjacency in the map variables (A, B, C, and D), firstfor terms with the entered variable and then for terms without the entered variable. We canthink of this as a two step process. First we cover all the map entered variables with maximumsized groupings, then we cover the rest of the variables. In order to cover the map enteredvariables, we need to think of the 1s in the map in terms of the variable E. In terms of E, the 1really represents E + E becauseABCD = ABCDE + ABCDE. So if we write out the 1s interms of E, the map becomes the map shown in Figure 3.12-2. Now to cover the map enteredvariables, we group entries in any neighbor cells which have the sameentered variable,because they're logic adjacent in the map variables (Figure 3.12-3). Thus, we can group the Eentries together to form a grouping of two (ABCDE + ABCDE = ABDE) and the Eentriestogether to form another grouping of two (ABCDE + ABCDE = ACDE). We need to emphasizethat near neighbor entries with the sameentered variable are grouped together. The single Ewith no neighbors forms an island.

    In this first step, we must cover all the single map entered variables. (All the Es and Es

    but not necessarily the E+Es.) In this example, we do not need to take the second step andcover other variables because we've covered all the entries in the map with the first step. Notethat the 1 (E+E) is completely covered. The simplified function for this map is,

    F = ABCDE + ABDE + ACDE

    The map reading is the same as a map reading for a normal map, except here we need toremember to include the common map entered variable in the simplified terms.

    Figure 3.12-3

  • 8/11/2019 Chapt3 Logic

    34/56

    3-33

    Figure 3.12-6

    A B C D E F

    0 0 0 0 0 10 0 0 0 1 10 0 0 1 0 0

    0 0 0 1 1 00 0 1 0 0 10 0 1 0 1 10 0 1 1 0 00 0 1 1 1 00 1 0 0 0 00 1 0 0 1 00 1 0 1 0 10 1 0 1 1 00 1 1 0 0 10 1 1 0 1 00 1 1 1 0 00 1 1 1 1 01 0 0 0 0 1

    1 0 0 0 1 11 0 0 1 0 11 0 0 1 1 01 0 1 0 0 11 0 1 0 1 11 0 1 1 0 1

    1 0 1 1 1 01 1 0 0 0 01 1 0 0 1 01 1 0 1 0 11 1 0 1 1 01 1 1 0 0 01 1 1 0 1 01 1 1 1 0 01 1 1 1 1 1

    Table 3.13-1.

    Figure 3.13-1.

    Figure 3.12-4

    Suppose we change the example slightly so we can see the two step map readingprocess. If we delete the term in the function which contains E, then the map is as shown inFigure 3.12-4. The covering for the map entered variables is shown in Figure 3.12-5. In thiscovering of the map entered variables, the 1 (E+E) is not completely covered (E is not

    grouped). In this case we form a second map with all the map enteredvariables which are completely covered entered as 0s and all the mapentered variables which are not completely covered entered as 1s. Allthe singlemap entered variables must be covered in the first step andnot appear in the second step. For this example, the second map is asshown in Figure 3.12-6. We now group the 1 entries in the second map.Here there is only an island. The simplified function is found fromreading both the first and second maps,

    F = ABCDE + ACDE + ABCD

    The first two terms are from reading the first map; the last term is fromreading the second map. We'll formulate rules for grouping entriesin a VEM to get a minimal covering later, but first we'll considersome other examples of forming VEMs.

    3.13 Forming a VEM from a Truth Table.

    A VEM can be readily formed from a truth table for afunction. As an example, consider thetruth table in Table 3.13-1. If we want toform a VEM for this function we can takethe first four variables to be the mapvariables and the last variable to be theentered variable. Note that if we do this,the map variables appear in groups of twoin the truth table. The first two entries inthe table have the same map variables,the second two have the same mapvariables, and so on. Thus, informationfrom the first two entries in the table mustbe entered in cell 0 of the map,

    information from the second two entries must be entered in cell 1,and so on. To determine what value to enter in the cell we look atthe value of the function for the two entries associated with the cell(Eand E) and enter those values of E for which the function is true.The map for this function is shown in Figure 3.13-1. The first twoentries in the truth table are true for bothE and Eso E+E isentered in the 0 cell. The second two entries are not true for eitherEor Eso 0 is entered in the 1 cell, and so on.

    Figure 3.12-5

  • 8/11/2019 Chapt3 Logic

    35/56

    3-34

    Figure 3.13-4

    Figure 3.13-2

    The first step covering for this map is as shown in Figure 3.13-2. Note we have to coverall the single entered variables but not the E+Eentries. In fact, we should not group the E+Eentries in the first step unless we need them to group with one of the single entered variables.Again we emphasize that entries with a common entered variable are grouped. Do not groupEwithEentries. The second step map for this function is shown in Figure 3.13-3. The minimalcover for this map is as shown. The simplified function from these maps is,

    F = ABCDE + ABE + BCDE + BD

    The first four terms are from the first (variable entered) map;the last term is from the second (reduced) map.

    Now we want to modify this example to see how tohandle a completely covered E+E term in the first step byusing a don't care term in the second map. Suppose thetruth table is changed so that the VEM for the function is asshown in Figure 3.13-4. (The function value in row 25 of thetruth table is changed to 1.)

    Figure 3.13-3

  • 8/11/2019 Chapt3 Logic

    36/56

    3-35

    Figure 3.13-5 Figure 3.13-6

    A B C D E F

    0 0 0 0 0 x0 0 0 0 1 x0 0 0 1 0 00 0 0 1 1 00 0 1 0 0 1

    0 0 1 0 1 x0 0 1 1 0 00 0 1 1 1 00 1 0 0 0 00 1 0 0 1 00 1 0 1 0 10 1 0 1 1 00 1 1 0 0 10 1 1 0 1 00 1 1 1 0 00 1 1 1 1 01 0 0 0 0 11 0 0 0 1 11 0 0 1 0 x1 0 0 1 1 01 0 1 0 0 11 0 1 0 1 11 0 1 1 0 11 0 1 1 1 0

    1 1 0 0 0 01 1 0 0 1 01 1 0 1 0 11 1 0 1 1 01 1 1 0 0 01 1 1 0 1 01 1 1 1 0 01 1 1 1 1 1

    Table 3.13-2.

    Figure 3.13-8

    Figure 3.13-7

    When we group the entered variables in this map (Figure 3.13-5), the E+Ein the upperright corner is completely covered. This means that it need not appear in the reduced map. Onthe other hand, since we can use an entry in the map more than once, if this term is included inthe reduced map it may be possible to get a better grouping in that map. We resolve thisconflict by entering this term in the reduced map as a don't care (x) so that it can be used tosimplify a grouping if needed, but need not be used. The reduced map for this example is

    shown in Figure 3.13-6. This difference does not change the grouping of entries in the reduced

    map because in this example we include the don't care term in the grouping of the four cornerentries. In some cases, we may not want to use the don't care term. The simplified function forthese maps is,

    F = ABCDE + ABE + BCDE + ACDE + ACDE + BD

    In some cases we maywant to map functions with don'tcares in VEMs. Consider thefunction defined by the truthtable shown in Table 3.13-2.The VEM for this function isshown in Figure 3.13-7. In cell 0of this map, the function value isdon't care for both Eand E, sowe enter this information into thecell. To show the don't careassociated with the enteredvariable we preface the variablewith don't care (x). In cell 2, the function is 1 for Eand don't carefor E. In this case, both Eand Eare entered in the cell but E isprefaced with a don't care (x). In cell 9, the function is 0 for Eanddon't care for E. In this case, only Eis entered in the cell but it isagain prefaced by x. In theVEMs we have been forming,we've entered E+Efor 1 andxE+xEfor x. This makes it

    easier to see how to group theentered variables. Now thatwe've seen some of thesegroupings, we are going to dofuture maps with 1s and xs.With this change, the VEM forthis example is as shown inFigure 3.13-8. We must

  • 8/11/2019 Chapt3 Logic

    37/56

    3-36

    Figure 3.13-9

    remember in making groupings that both the Eand the Ein the 1 can be grouped separatelyand both the xEand the xEin the x can be grouped separately. The minimal covering for theentered variables is shown in Figure 3.13-9 and the reduced map with its minimal cover is

    shown in Figure 3.13-10. Note that the don't cares are all used in the reduced map to get thelargest groupings possible. The simplified function for these maps is,

    F = ABCDE + BCDE + ACDE + ACDE + BD

    3.14 VEM Map Grouping Rules

    We've been making groupings of entries in VEM maps in the last two sections, but wedon't have a formal way of forming groups for a minimal grouping. Forming groupings for aVEM is a two step process. First, we group all the single entered variables (EVs) which occur inthe cells of the map. Then, we form a reduced map with no entered variables and we group the1s in this map just as we did with a standard Karnaugh map. With the overall constraint that wenever choose a grouping which is completely covered by a larger grouping, the rules forgrouping the entered variables in the first step are:

    1. Examine all the single entered variables (Eor E) one at a time and determine whichvariables cannot be grouped with another identical entered variable, 1, don't care for an

    identical variable, or don't care. These are islands as in the standard Karnaugh map.2. Examine all the single entered variables one at a time and determine those variables

    which can be grouped in only one way with another identical entered variable, 1, don'tcare for an identical variable, or don't care. Group these variables.

    3. Examine all the remaining ungrouped single entered variables one at a time anddetermine those variables which can be grouped in more than one way. Try to groupthese variables first with another identical ungrouped entered variable, second with anuncovered or partially covered 1. Try to choose groupings which will completely coverthe 1s, particularly 1s which will be islands in the reduced map. When grouping thesevariables with covered entered variables, covered 1s, don't care entered variables, anddon't cares, just make an arbitrary choice.

    4. Repeat steps 2 and 3, examining each ungrouped single entered variable andconsidering groupings of four entered variables, 1s, and don't cares.

    5. Repeat steps 2 and 3, examining each ungrouped single entered variable andconsidering groupings of eight entered variables, 1s, and don't cares.

    All the single entered variables must be covered in this first step.

    Figure 3.13-10

  • 8/11/2019 Chapt3 Logic

    38/56

    3-37

    The second step is to form the reduced map. Entries in the VEM are transferred to thereduced map using the following rules.

    0 ))> 0

    EV))

    > 0

    EV ))> 0

    1 ))> x, if it is completely covered.

    1 ))> 1, if it is not completely covered.

    x ))> x

    xEV ))> 0

    xEV ))> 0

    EV + xEV))

    > x, if EVis covered.

    EV + xEV ))> 1, if EVis not covered.

    xEV + EV ))> x, if EVis covered.

    xEV + EV ))> 1, if EVis not covered.

    The reduced map is a normal map and groupings are made in the normal way. Both mapsmust be read to determine the simplified function.

    To see how these rules work, we'll apply them to some examples. We have developedVEMs for five variable functions entered on a map with four map variables, so that there is one

    entered variable. Sometimes it is convenient to use VEMs with less than four map variables.For example, we might enter a four variable function on a map with three map variables or wemight enter a three variable function on a map with two map variables. We'll look at some ofthese smaller VEMs in the first few examples because they are less complicated.

    Example 3.14-1.

    Simplify the function with the VEM shown below on the left. Note that this isa three variable function in a two variable map. The entered variable here isC.

    The C in cell 3 can be grouped with the 1 in cell 1 (center map above). Thereduced map (map above and on the rignt) has a 1 in cell 1 since that 1 wasnot completely covered in the previous map. This entry is an island. Now,when we read the maps we get the simplified function,

  • 8/11/2019 Chapt3 Logic

    39/56

    3-38

    F = BC + AB

    Example 3.14-2.

    Simplify the function with the VEM shown below on the left. Note that this isa three variable function in a two variable map. The entered variable here is

    C.

    Both the C and C can be grouped with the 1 (center map above). Since the 1 incell 1 is completely covered an x is entered in the reduced map (right mapabove). The reduced map has no required groups. When we read the maps, weget the simplified function,

    F = AC + BC

    Example 3.14-3.

    Simplify the function with the VEM shown below on the left. Note that this isa four variable function in a three variable map. The entered variable hereis D.

    The entered variables can be covered with the two groupings of four as shownin the center map above. The reduced map (above, left) has a 1 in cell onebecause this 1 is not covered in the first map, and an x in cell 6 because the1 is completely covered in the first map. The xs in cells 2 and 5 transfer tothe reduced map. In the reduced map, the 1 in cell 1 can be grouped with the xin cell 5. When we read the maps we get the simplified function,

    F = BD + CD + BC

    Example 3.14-4.

    Simplify the function represented in the following VEM.

  • 8/11/2019 Chapt3 Logic

    40/56

    3-39

    The minimal covering for entered variables is shown below on the left. The Ein cell 3 is an island (rule 1). The E in cell 5 can only be grouped with the1 in cell 4 (rule 2). The E in cell 15 can only be grouped with the 1 in cell14 (rule 2). The E in cell 9 can only be grouped with E in cell 8 (rule 2).The E in cell 12 can be grouped in several ways--with the 1 in cell 4 or incell 14 or with the E in cell 8 (rule 3). The E in cell 8 is already coveredso it should not be grouped with the E in this cell if there are other

    choices. If we group the E with the 1 in cell 4 or cell 14, the 1 will becompletely covered and may simplify the reduced map. By looking ahead, we cansee the best choice is to completely cover the 1 in cell 14, because it willbe an island in the reduced map, while the 1 in cell 4 can be grouped with the1 in cell 0.

    The reduced map for this example is shown above on the right. The 1s in cells0 and 4 are not completely covered, so they're transferred to the reduced mapas 1s. The 1 in cell 14 is completely covered, so it is transferred as adon't care. The single entered variables and the 0s all transfer as 0s. Theminimal covering for this map is as shown. The don't care in cell 14 is notcovered because its use will not result in a better covering. The simplifiedfunction is,

    F = ABCDE + ABCE ABDE + ABCE + ABCE + ACD

  • 8/11/2019 Chapt3 Logic

    41/56

    3-40

    Example 3.14-5.

    Simplify the function represented in the VEM shown below.

    The minimal covering for the entered variables is shown below on the left .There are no islands (rule 1). The E in cell 5 can only be grouped with thedon't care in cell 4. The only other entered variable which cannot be grouped

    in a grouping of four is the E in cell 15. It can be grouped in more than oneway (rule 3). It should be grouped with the E in cell 11, so that the entriesin this cell are completely covered. Now, considering entered variables which

    group into groups of four, the E in cell 9 can only be grouped with theentries in cells 12, 13, and 8. This completes the minimal covering for theentered variables. The possible grouping of four entries in the top row arenot used because all the entered variables have been covered. The reduced mapfor this example is shown above right. The uncovered 1s in cells 0 and 14transfer as 1s. The don't care in cell 4 transfers as a don't care. The xE+Ein cell 12 and E+xE in cell 11 transferred as don't cares, because theessential variable in each is covered. The minimal cover for the reduced mapis as shown on the top right of the nest page.

    The simplified function is,

    F = ABCE + ACDE + ACE + ABD + ACD

    Once we become familiar with VEM map simplifications, it's possible to do the map

    covering on one map without the use of the reduced map. To do the covering using only onemap, proceed just as in the examples above and cover all the entered variables. In this step, allthe single entered variables must be covered. Once all the single entered variables arecovered, ignore the single entered variables and concentrate on the 1s which are notcompletely covered. These 1s must be grouped with other 1s which are not completelycovered, 1s which are completely covered, or don't cares. To see how this is done consider thefollowing examples.

  • 8/11/2019 Chapt3 Logic

    42/56

    3-41

    Example 3.14-6.

    Simplify the three variable function with the (two map variable) VEM shownbelow.

    To cover this map we first group the entered variables as shown below on theleft. The C in cell 3 can only be grouped in one way with the 1 in cell 1(rule 2). This covers all the entered variables but leaves the 1 in cell 1only partially covered. It is an island as shown on the right below (shownwith dashed lines for clarity).

    Reading the map gives us the simplified function,

    F = BC + AB

    The first term is from the grouping involving the entered variable; the secondis from the grouping involving the 1.

    Example 3.14-7.

    Simplify the three variable function with the (two map variable) VEM shownbelow on the left.

    To cover this map, we first group the entered variables as shown above on theright. The C in cell 0 can only be grouped in one way with the 1 in cell 1(rule 2). The C in cell 3 can only be grouped in one way with the 1 in cell 1(rule 2). This completes the cover since the 1 in cell 1 is completelycovered.

  • 8/11/2019 Chapt3 Logic

    43/56

    3-42

    Reading the map gives us the simplified function,

    F = AC + BC

    Example 3.14-8.

    Simplify the four variable function with the (three map variable) VEM shown

    below.

    To cover this map we first group the entered variables as shown below on theleft. The D in cell 3 can only be grouped in one way with the x in cell 2(rule 2). The D in cell 0 can be grouped in one way with the entries in cells

    2, 6, and 4 (rule 2 for a group of 4). This covers all the entered variablesbut leaves the 1 in cell 6 only partially covered. It must be grouped withthe x in cell 2 as shown on the right below (shown with dashed lines forclarity).

    Reading the map gives us the simplified function,

    F = ABD + CD + BC

    The first two terms are from the groupings involving entered variables; thesecond is from the grouping involving 1.

    Example 3.14-9.

    Simplify the logic function defined by the following VEM.

  • 8/11/2019 Chapt3 Logic

    44/56

    3-43

    To cover this map, we first group all the single entered variables as shownbelow on the left. There are no islands. The E in cell 7 can form a groupingof two with the 1 in cell 5 or the xE in cell 15. It is grouped with the 1(rule 3). The remaining entered variables can all be grouped in groupings offour. The E in cell 11 can only be grouped in one way with a grouping of four(the x in cell 8, the 1 in cell 9, and the xE in cell 10). The E in cell 13can be grouped in two ways to form a grouping of four. The grouping with the1s in cells 1, 5, and 9 is chosen over the grouping with the xE in cell 12,

    the x in cell 8, and the 1 in cell 9 (rule 3). Note that this choicecompletely covers the 1s in both cells 5 and 9, and thus has more potentialfor simplifying the covering needed for the 1s in the next step of thesimplification.Now that we have all the entered variables covered, we have to cover all the

    1s that are not completely covered. The only 1 which is not completelycovered is in cell 1. It can be grouped with the 1 in cell 5 or with the 1 incell 9. We choose to group it with the 1 in cell 5 as shown above on theright (shown with dashed lines for clarity). We've completed the covering ofboth the entered variables and the uncovered and partially covered 1s on asingle map. To complete the simplification we need to read the map, takingcare not to forget the entered variables. The simplified function is,

    F = ABDE + ABE + CDE + ACD

    The first three terms are from the groupings involving entered variables; thelast term is from the grouping of 1s.

  • 8/11/2019 Chapt3 Logic

    45/56

    3-44

    Example 3.14-10.

    Simplify the logic function defined by the following VEM.

    To cover this map, we first group all the single entered variables as shownbelow on the left. There are no islands. There are no entered variableswhich cannot be grouped in groupings of four. The E in cell 8 can be groupedin only one way, with the 1s in cells 0, 2, and 10, the corners (rule 2). The

    E in cell 7 can only be grouped in one way, with the E in cell 6, the xE incell 5, and the 1 in cell 4, to form a grouping of four (rule 2). The Es incells 9 and 13 can only be grouped in one way, with the E in cell 5 and the 1in cell 1, to form a grouping of four.

    Now that we have all the entered variables covered, we must cover all the 1sthat are not completely covered. The 1s in cells 0, 1, 2, 4, and 10 are onlypartially covered. The covering for these 1s is shown on the right above(dashed for clarity). Notice how we've used the E+xE in the grouping of four1s in cells 0, 1, 4, and 5. We've completed the covering of both the enteredvariables and the uncovered and partially covered 1s on a single map. Tocomplete the simplification we need to read the map, taking care not to forgetthe entered variables. The simplified function is,

    F = BDE + ABE + CDE + BCD + AC

    The first three terms are from the groupings involving entered variables; thelast two terms are from the groupings of 1s.

  • 8/11/2019 Chapt3 Logic

    46/56

    3-45

    Example 3.14-11.

    Simplify the logic function defined by the following VEM.

    To cover this map, we first group all the entered variables as shown below onthe left. This map is similar to the map in the previous example. There areno islands. There are no entered variables which cannot be grouped ingroupings of four. The E in cell 8 can be grouped in only one way, with the1s in cells 0, 2, and 10, the corners (rule 2). The E in cell 7 can only be

    grouped in one way, with the E in cell 6, the xE in cell 5, and the 1 in cell4, to form a grouping of four (rule 2). Note that the E in cell 5 does notneed to be covered, since it occurs with xE and is thus not a single enteredvariable. Now that we have all the entered variables covered, we must coverall the 1s that are not completely covered. Since the E in cell 5 is not

    covered, the xE+E in that cell must betreated as a partially covered 1. Other partially covered 1s occur in cells0, 2, and 8. The covering for the uncovered 1s is shown on the right above(dashed for clarity). The uncovered E in cell 5 is grouped with the xE in thesame cell. We've completed the covering of both the entered variables and theuncovered and partially covered 1s on a single map. To complete thesimplification we need to read the map, taking care not to forget the enteredvariables. The simplified function is,

    F = BDE + CDE + ABD + BCD + ABCD

    The first two terms are from the groupings involving entered variables; thelast three terms are from the groupings of 1s.

    3.15 VEMs with More Than One Entered Variable

    VEMs can be formed for functions of six or more variables in much the same way as forfive variables. Instead of entering a variable in a cell so that the combination of map variablesand entered variables gives a true condition for that cell of the map, an expression involving themapped variables is entered in the cell such that the combination of map variables and the

  • 8/11/2019 Chapt3 Logic

    47/56

    3-46

    Figure 3.15-1 Figure 3.15-2 Figure 3.15-3

    Figure 3.15-4

    expression gives a true condition for that cell of the map. This can be clarified with an example.

    First we will consider a six variable function where the entered E and F do not occur together inany of the cells. Consider the function

    G = ABCDE+ ABCDE + ABCD + ABCDF + ABCD + ABCDF + ABCDF

    The four map variable VEM for this function is shown in Figure 3.15-1. The first term maps tocell 0 (0000) and we enter the variable E. The second term maps to cell 5 (0101) and we enterthe variable E. The third term maps to cell 13 (1101) and we enter a 1 since this term does notcontain an entered variable. The fourth term maps to cell 15 (1111) and we enter the variableF. The fifth term maps to cell 6 (0110) and we enter a 1 since this term does not contain anentered variable. The sixth term maps to cell 14 (1110) and we enter the variable F. Theseventh and final term maps to cell 10 (1010) and we enter the variable F. For the remainingcells, we enter 0. Since there is no overlap between groupings of the entered variables E andF, the minimal covering of entered variables for this map is relatively easy to determine and isas shown in Figure 3.15-2. The reduced map is shown in Figure 3.15-3. Note that neither 1 is

    completely covered by both the entered variables, so they transfer to the reduced map. Thesimplified expression for this function is,

    G = ABCE+ BCDE + ABDF + ACDF + ABCD + ABCD

    This example of two entered variables is not much different from a single entered variable sinceno expressions involving both entered variables, only single entered variables occur in the map.Now we will see how to handle expression in the cells.

    Suppose we wish to form a VEM for the function,

    G = ABCDEF + ABCDEF + ABCDEF + ABCDEF + ABCDF + ABCD

    The four map variable VEM is shown in Figure 3.15-4. Thefirst and second terms map into cell 15 because the mapvariables for both of these terms are A, B, C, and D. Theentered variable expression from these terms is EF+EF,

    the expression which makes these terms true. The thirdterm goes in cell 11 because the map variables are A, B,C, and D, and the entered variable expression is EF. Thefourth term goes in cell 12 because the map variables areA, B, C, D, and the entered variable expression is EF. Thefifth term goes in cell 8, and the entered variableexpression is F. This term is true, independent of the valueof E. The sixth term goes in cell 0, and the entered

  • 8/11/2019 Chapt3 Logic

    48/56

    3-47

    Figure 3.15-5

    Figure 3.15-6

    variable expression is 1. This term is true, independent of thevalue of both E and F.

    In this map it's tricky to cover the entered variables butit can be done (Figure 3.15-5). Remember in grouping cells ofthe VEM, the entered variable expressions in all the cells of thegroup must be identical. If we note that the F in cell 8 can be

    expanded to EF+EF, then we can group EF in cell 12 with EFin cell 8. If we note that the 1 in cell 0 can be expanded toF+F, then we can group the F in cell 12 with the F in cell 0.There is no way to group the entries in cells 15 and 11because there are no common terms, although the two terms in cell15 can be grouped together. These groupings give us the minimalcovering for the entered variables shown. The reduced map is shownin Figure 3.15-6. This reduced map is rather trivial. Only the partiallycovered 1 is transferred to the reduced map.

    The simplified function for these maps is,

    G = ABCDEF + ACDEF + ABCDE + BCDF + ABCD

    The common variables in each grouping remain in the simplifiedexpression. We must be careful to include the entered variables.

    Our final examples of simplification of VEMs with more than one entered variable will betwo and three map variable VEMs with two entered variables such as we'll use later in the textwhen we treat state machine design. In state machine design, we form the maps directly so allwe need consider is simplification.

    Example 3.15-1.

    Simplify the four variable function with the (two map variable) VEM shownbelow on the left.

    The single map cover for this map is shown on the right above. The enteredvariables can be covered with the two groupings of two. Both CD and C can begrouped with the 1 but they do not cover it completely. We must also cover the1 as an island. Reading the map gives us the simplified expression,

    F = BC + AB + ACD

    Example 3.15-2.

    Simplify the four variable function with the (two map variable) VEM shown onthe top left of the nest page.

  • 8/11/2019 Chapt3 Logic

    49/56

    3-48

    The single map cover for this map is shown on the right above. The enteredvariable expression CD can group with the entered variable C, but it does notcover it completely, so the C must also be grouped as an island. Reading themap gives us the simplified function,

    F = ACD + ABC

    Example 3.15-3.

    Simplify the five variable function with the (three map variable) VEM shownbelow on the left.

    The single map cover for this map is shown on the right above. The enteredvariable expression DE (cell 3) can group with the D in cell 7. Note that inan andexpression like DE the entire expression DE is grouped as a singleentity. When we cover the DE part of D in cell 6 we are left with only E,since DE + E = E. The other entered variable expressions can all be groupedas groups of four. The DE (cell 0) can be grouped with the don't care in cell3, the D in cell 6, and the don't care in cell 4. When we cover the DE partof D in cell 6 we are left with only E since DE + E = E. This leaves only the

    Es in cells 6 and 7 which can be grouped with the don't cares in cells 4 and5. With this covering, all the entered variables are completely covered.There are no 1s in this map so there are no partially covered 1s which need tobe covered. Reading the map gives us the simplified expression,

    F = CDE + AE + BCDE

    Example 3.15-4.

    Simplify the five variable function with the (three map variable) VEM shownbelow on the left.

    The single map cover for this map is shown on the right above. All the

  • 8/11/2019 Chapt3 Logic

    50/56

    3-49

    entered variables can be grouped in groups of 4. The DE in cell 0 can begrouped with the D in cell 1, the 1 in cell 3, and the x in cell 2. The DE incell 6 can be grouped with the D in cell 7, the 1 in cell 3, and the x in cell2. Note that all that remains in cells 6 and 7 is E, since in cell 1, DE + E= E and in cell 7, DE + E = E. The Es in cell 1 and 7 can be grouped with the1 in cell 3 and the x in cell 5. This completely covers the 1 in cell 3, DE+ DE + E = 1. Reading the map gives us the simplified expression,

    F = ADE + BDE + CE

    Now that we have the mathematical tools, we'll find the design of logic circuits rathersimple.

  • 8/11/2019 Chapt3 Logic

    51/56

    3-50

    Exercises

    1. Prove the following identities using substitution.

    1 + A = 1 0AA = 00 + A = A 1AA = AA + A = A AAA = A

    A + A = 1 AAA = 0

    2. Prove the commutative law

    A + B = B + AAB = BA

    and the distributive law

    A + (BC) = (A + B)(A + C)A(B + C) = (AB) + (AC)

    using substitution.

    3. Prove

    (a) AB + AC + BC = AB + AC

    (b) (A + B)(A + C)(B + C) = (A + B)(A + C)

    4. Simplify the following logic expressions.

    (a) F = ABCD + ABCD + ABCD +ABCD(b) F = ABCD + BCD + ACD(c) F = ABCD + ABCD + ACD + ABCD(d) F = ABD + ABD + BCD(e) F = ABCD + ABD + ABC + ABCD(f) F = ABCD + ABD + ABD + ABD(g) F = ABD + BCD + ABD + ABD(h) F = ACD + ACD + BCD(i) F = ABCD + ABCD + ABCD + ABCD + ABCD(j) F = ABCD + ABCD + ABCD + ABCD + ABCD(k) F = BD + ABD + CBD + ABC(l) F = ABCD + ABCD + ABCD + ABCD(m) F = ABCD + ABCD + ABCD + ABCD + ABCD(o) F = AB + CD + AB(p) F = ABC + ABCD + ABC + ABCD(q) F = ABC + ABD + ABC + ABD(r) F = A + ABCD + ABC + ABC + ABC

  • 8/11/2019 Chapt3 Logic

    52/56

    3-51

    5. Simplify the following logic expressions using De Morgan's Theorem.

    (a) F = (A + B + C)(A + B + C)

    (b) F = A + BC + C

    (c) F = (A + B)CD

    (d) F = (A + B + C + D)AB

    (e) F = ABCABCD

    (f) F = A + B + CAA + B + D

    6. Make truth tables for F1and F2in the following 2-bit, binary subtraction.

    A B-C DF2 F1

    7. Make truth tables for F1, F2, F3, and F4in the following 2-bit, binary multiplication.

    A B xC DF4 F3 F2 F1

    8. Make truth tables for each of the following one bit, binary expressions. (Note theoperations are binary operations not Boolean operations.) Drop all carries and assumea borrow can be made whenever it is needed.

    (a) F = A + B - C(b) F = AB - C (AB is AxB)(c) F = A + B + C + D(d) F = A + B + C - D(e) F = ABC - AD

    9. Express each of the following functions (defined by a truth table) as a sum of minterms.(Note that there are several functions Fa, Fb, and so on defined in a single table.)

    A B C FaFbFcFdFeFfFgFhFiFjFk

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

    1 1 1 0 0 0 0 0 1 1 1 1 1 1

    10. Express each of the functions of problem 9 as a products of maxterms.

  • 8/11/2019 Chapt3 Logic

    53/56

    3-52

    11. Express each of the following functions (defined by a truth table) as a sum of minterms.

    A B C D FaFbFcFdFeFfFgFhFiFjFk

    0 0 0 0 0 1 0 1 0 1 0 1 0 0 00 0 0 1 1 1 1 0 0 0 1 1 0 1 00 0 1 0 1 1 1 0 0 0 0 0 1 1 1

    0 0 1 1 1 0 0 1 1 1 1 1 0 1 00 1 0 0 1 0 1 1 1 0 0 1 0 1 00 1 0 1 1 1