Karnaugh Map Exercise

download Karnaugh Map Exercise

of 21

Transcript of Karnaugh Map Exercise

  • 8/12/2019 Karnaugh Map Exercise

    1/21

    Exercise - Karnaugh mapping

    Question 1:Identify each of these logic gates by name, and complete their respective truth tables:

    Question 2:AKarnaugh mapis nothing more than a special form of truth table, useful for reducing logicfunctions into minimal Boolean expressions.

    Here is a truth table for a specific three-input logic circuit:

    Complete the folloing !arnaugh map, according to the values found in the above truth table:

  • 8/12/2019 Karnaugh Map Exercise

    2/21

    Question 3:AKarnaugh mapis nothing more than a special form of truth table, useful for reducing logic

    functions into minimal Boolean expressions.

    Here is a truth table for a specific four-input logic circuit:

    Complete the folloing !arnaugh map, according to the values found in the above truth table:

    Question 4:Here is a truth table for a four-input logic circuit:

  • 8/12/2019 Karnaugh Map Exercise

    3/21

    If we translate this truth table into a Karnaugh map, we obtain the following result:

    Note how the only 1's in the map are clustered together in a group of four:

    If you loo" at the input variables #A, B, C, and $%, you should notice that only to of themactually change ithin this cluster of four &'s. (he other to variables hold the same value for

    each of these conditions here the output is a )&). Identify hich variables change, and hich

    stay the same, for this cluster.

    Question 6:

    Here is a truth table for a four-input logic circuit:

  • 8/12/2019 Karnaugh Map Exercise

    4/21

    If we translate this truth table into a Karnaugh map, we obtain the following result:

    Note how the only 1's in the map all exist on the same row:

    If you loo" at the input variables #A, B, C, and $%, you should notice that only to of them are

    constant for each of the )&) conditions on the !arnaugh map. Identify these variables, andremember them.

    *o, rite an + #+um-of-roducts% expression for the truth table, and use Boolean algebra to

    reduce that ra expression to its simplest form. hat do you notice about the simplified +expression, in relation to the common variables noted on the !arnaugh map/

    0eveal Anser

    1or this cluster of four &'s, variables A and B are the only to inputs that remain constant for the

    four )&) conditions shon in the !arnaugh map. (he simplified Boolean expression for the truth

    table is AB. +ee a pattern here/

    Notes:

    (his 2uestion strongly suggests to students that the !arnaugh map is a graphical method of

    achieving a reduced-form + expression for a truth table. nce students reali3e !arnaugh

    mapping holds the "ey to escaping arduous Boolean algebra simplifications, their interest ill bepi2ued4

    Hide Anser

    Question 7:

    ne of the essential characteristics of Karnaugh maps is that the input !ariable se"uences are

    http://showcontent%28%27answer_6%27%29/http://hidecontent%28%27answer_6%27%29/http://hidecontent%28%27answer_6%27%29/http://showcontent%28%27answer_6%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    5/21

    always arranged in #ray code se"uence$ %hat is, you ne!er see a Karnaugh map with the inputcombinations arranged in binary order:

    %he reason for this is apparent when we consider the use of Karnaugh maps to detect common!ariables in output sets$ &or instance, here we ha!e a Karnaugh map with a cluster of four 1's atthe center:

    rranged in this order, it is apparent that two of the input !ariables ha!e the same !alues foreach of the four (high( output conditions$ )e-draw this Karnaugh map with the input !ariablesse"uenced in binary order, and comment on what happens$ *an you still tell which input!ariables remain the same for all four output conditions+

    0eveal Anser

    5oo"ing at this, e can still tell that B 6 & and $ 6 & for all four )high) output conditions, but

    this is notapparent by proximity as it as before.

    http://showcontent%28%27answer_7%27%29/http://showcontent%28%27answer_7%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    6/21

    Notes:

    7ou could simply tell your students that the input variables must be se2uenced according to 8ray

    code in order for !arnaugh mapping to or" as a simplification tool, but this ouldn't explain tostudents whyit needs to be such. (his 2uestion shos students the purpose of 8ray code

    se2uencing in !arnaugh maps, by shoing them the alternative #binary se2uencing%, and

    alloing them to see ho the tas" of see"ing noncontradictory variables is complicated by it.

    Hide Anser

    Question 8:

    xamine this truth table and corresponding Karnaugh map:

    %hough it may not be ob!ious from first appearances, the four (high( conditions in the Karnaughmap actually belong to the same group$ %o mae this more apparent, I will draw a new.o!ersi/ed0 Karnaugh map template, with the #ray code se"uences repeated twice along eachaxis:

    http://hidecontent%28%27answer_7%27%29/http://hidecontent%28%27answer_7%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    7/21

    1ill in this map ith the 9 and & values from the truth table, and then see if a grouping of four

    )high) conditions becomes apparent.

    0eveal Anser

    1ollo-up 2uestion: hat does this problem tell us about grouping/ In other ords, ho can e

    identify groups of )high) states ithout having to ma"e oversi3ed !arnaugh maps/

    Notes:

    (he concept of bit groups extending past the boundaries of a !arnaugh map tends to confuse

    students. In fact, it is about the only thing that tends to confuse students about !arnaugh maps4

    +imply telling them to group past the borders of the map doesn't really teach them whythetechni2ue is valid. Here, they should see ith little difficulty hy the techni2ue or"s.

    And, if for some reason they ust can't visuali3e bit groups past the boundaries of a !arnaugh

    map, they "no they can ust dra an oversi3ed map and it ill become obvious4

    Hide Anser

    Question 9:

    A student is as"ed to use !arnaugh mapping to generate a minimal + expression for the

    folloing truth table:

    A B C utput

    9 9 9 9

    9 9 & 9

    9 & 9 9

    http://showcontent%28%27answer_8%27%29/http://hidecontent%28%27answer_8%27%29/http://showcontent%28%27answer_8%27%29/http://hidecontent%28%27answer_8%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    8/21

    9 & & &

    & 9 9 9

    & 9 & &

    & & 9 9

    & & & &

    &ollowing the truth table shown, the student plots this Karnaugh map:

    (%his is easy,( says the student to himself$ ll the '1' conditions fall within the same group2( %hestudent then highlights a triplet of 1's as a single group:

    3ooing at this cluster of 1's, the student identifies * as remaining constant .10 for all threeconditions in the group$ %herefore, the student concludes, the minimal expression for this truthtable must simply be *$Howe!er, a second student decides to use 4oolean algebra on this problem instead ofKarnaugh mapping$ 4eginning with the original truth table and generating a 5um-of-6roducts.560 expression for it, the simplification goes as follows:

    A

    BC ; A

    B

    C ; ABC

    BC#A

    ; A% ; A

    B

    C

  • 8/12/2019 Karnaugh Map Exercise

    9/21

    BC ; AB

    C

    C#B ; AB

    %

    C#B ; A%

    AC ; BC

    b!iously, the answer gi!en by the second student's 4oolean reduction .* 7 4*0 does notmatch the answer gi!en by the first student's Karnaugh map analysis .*0$6erplexed by the disagreement between these two methods, and failing to see a mistae in the4oolean algebra used by the second student, the first student decides to chec his Karnaughmapping again$ 8pon reflection, it becomes apparent that if the answer really were *, theKarnaugh map would loo different$ Instead of ha!ing three cells with 1's in them, there wouldbe four cells with 1's in them .the output of the function being (1( anytime * 9 1:

    +omehere, there must have been a mista"e made in the first student's grouping of &'s in the

    !arnaugh map, because the map shon above is the only one proper for an anser of C, and it is

    not the same as the real map for the given truth table.

  • 8/12/2019 Karnaugh Map Exercise

    10/21

    6roper grouping of 1's in the Karnaugh map:

    Notes:

    (he purpose of this 2uestion is to illustrate ho it is incorrect to identify clusters of arbitrary si3ein a !arnaugh map. A cluster of three, as seen in this scenario, leads to an incorrect conclusion.

    f course, one could easily 2uote a textboo" as to the proper numbers and patterns of &'s to

    identify in a !arnaugh map, but it is so much more informative #in my opinion% to illustrate by

    example. osing a dilemma such as this ma"es students thinkabout hy the anser is rong,rather than as"ing them to remember seemingly arbitrary rules.

    Hide Anser

    Question 10:

    +tate the rules for properly identifying common groups in a !arnaugh map.

    0eveal Anser

    Any good introductory digital textboo" ill give the rules you need to do !arnaugh mapping. Ileave you to research these rules for yourself4

    Notes:

    (he anser spea"s for itself here - let your students research these rules, and as" them exactly

    here they found them #including the page numbers in their textboo"#s%4%.

    Hide Anser

    Question 11:

    seven segment decoderis a digital circuit designed to dri!e a !ery common type of digitaldisplay de!ice: a set of 3 .or 3*0 segments that render numerals ; through < at thecommand of a four-bit code:

    http://hidecontent%28%27answer_9%27%29/http://showcontent%28%27answer_10%27%29/http://hidecontent%28%27answer_10%27%29/http://hidecontent%28%27answer_9%27%29/http://showcontent%28%27answer_10%27%29/http://hidecontent%28%27answer_10%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    11/21

    (he behavior of the display driver IC may be represented by a truth table ith seven outputs: onefor each segment of the seven-segment display #a through g%. In the folloing table, a )&) output

    represents an active display segment, hile a )9) output represents an inactive segment:

    $ C B A a b c d e f g $isplay

    9 9 9 9 & & & & & & 9 )9)

    9 9 9 & 9 & & 9 9 9 9 )&)

    9 9 & 9 & & 9 & & 9 & )=)

    9 9 & & & & & & 9 9 & )>)

    9 & 9 9 9 & & 9 9 & & )?)

    9 & 9 & & 9 & & 9 & & )@)

    9 & & 9 & 9 & & & & & ))

    9 & & & & & & 9 9 9 9 ))

    & 9 9 9 & & & & & & & ))

    & 9 9 & & & & & 9 & & )D)

    A real-life example such as this provides an excellent shocase for techni2ues such as !arnaugh

    mapping. 5et's ta"e output a for example, shoing it ithout all the other outputs included in thetruth table:

  • 8/12/2019 Karnaugh Map Exercise

    12/21

    $ C B A a

    9 9 9 9 &

    9 9 9 & 9

    9 9 & 9 &

    9 9 & & &

    9 & 9 9 9

    9 & 9 & &

    9 & & 9 &

    9 & & & &

    & 9 9 9 &

    & 9 9 & &

    6lotting a Karnaugh map for output a, we get this result:

    Identify ad=acent groups of 1's in this Karnaugh map, and generate a minimal 56 expressionfrom those groupings$Note that six of the cells are blan because the truth table does not list all the possible inputcombinations with four !ariables ., 4, *, and 0$ >ith these large gaps in the Karnaugh map, itis difficult to form large groupings of 1's, and thus the resulting (minimal( 56 expression hasse!eral terms$Howe!er, if we do not care about output a's state in the six non-specified truth table rows, wecan fill in the remaining cells of the Karnaugh map with (don't care( symbols .usually the letter?0 and use those cells as (wildcards( in determining groupings:

  • 8/12/2019 Karnaugh Map Exercise

    13/21

    ith this ne !arnaugh map, identify adacent groups of &'s, and generate a minimal +

    expression from those groupings.

    0eveal Anser

    Karnaugh map groupings with strict (1( groups:

    $

    B ;

    $

    CA ; $

    C

    B

    ;

    C

    B

    A

    !arnaugh map groupings ith )don't care) ildcards:

    $ ; B ; CA ;C

    A

    1ollo-up 2uestion: this 2uestion and anser merely focused on the a output for the BC$-to--segment decoder circuit. Imagine if e ere to approach all seven outputs of the decoder circuit

    in these to fashions, first developing + expressions using strict groupings of )&) outputs, and

    then using )don't care) ildcards. hich of these to approaches do you suppose ould yield

    the simplest gate circuitry overall/ hat impact ould the to different solutions have on thedecoder circuit's behavior for the six unspecified input combinations &9&9, &9&&, &&99, &&9&,

    &&&9, and &&&&/

    Notes:

    ne of the points of this 2uestion is for students to reali3e that bigger groups are better, in that

    they yield simpler + terms. Also, students should reali3e that the ability to use )don't care)

    states as )ildcard) placeholders in the !arnaugh map cells increases the chances of creating

    http://showcontent%28%27answer_11%27%29/http://showcontent%28%27answer_11%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    14/21

    bigger groups.

    (ruth be "non, I chose a pretty bad example to try to ma"e an + expression from, since there

    are only to non-3ero output conditions out of ten4 1ormulating a + expression ould havebeen easier, but that's a subect for another 2uestion4

    Hide Anser

    Question 12:

    hen designing a circuit to emulate a truth table such as this here nearly all the input

    conditions result in )&) output states, it is easier to use roduct-of-+ums #+% expressionsrather than +um-of-roducts #+% expressions:

    A B C utput

    9 9 9 &

    9 9 & &

    9 & 9 &

    9 & & &

    & 9 9 &

    & 9 & &

    & & 9 9

    & & & 9

    Is it possible to use a !arnaugh map to generate the appropriate + expression for this truthtable, or are !arnaugh maps limited to + expressions only/

  • 8/12/2019 Karnaugh Map Exercise

    15/21

    than they tend to free3e hen presented ith a problem li"e this. ithout specific instructions on

    hat to do, the obvious steps of )try it and see) elude them.

    It is your charge as their instructor to encourage an experimental mindset among your students.$o not simply tell them ho to go about )discovering) the anser on their on, for if you do

    you ill rob them of an authentic discovery experience.

    Hide Anser

    Question 13:

    Gse a !arnaugh map to generate a simple Boolean expression for this truth table, and dra arelay logic circuit e2uivalent to that expression:

    A B C utput

    9 9 9 9

    9 9 & 9

    9 & 9 &

    9 & & 9

    & 9 9 9

    & 9 & 9

    & & 9 &

    & & & 9

    0eveal Anser

    +imple expression and relay circuit:

    BC

    http://hidecontent%28%27answer_12%27%29/http://showcontent%28%27answer_13%27%29/http://hidecontent%28%27answer_12%27%29/http://showcontent%28%27answer_13%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    16/21

    Notes:

    ne of the things you may ant to have your students share in front of the class is their

    !arnaugh maps, and ho they grouped common output states to arrive at Boolean expressionterms. I have found that an overhead #acetate% or computer-proected image of a blan" !arnaugh

    map on a hiteboard serves ell to present !arnaugh maps on. (his ay, cell entries may beeasily erased and re-dran ithout having to re-dra the map #grid lines% itself.

    As" your students to compare using a !arnaugh map versus using standard +EBoolean

    simplifications to arrive at the simplest expression for this truth table. hich techni2ue ouldthey prefer to use, and hy/

    Hide Anser

    Question 14:

    Gse a !arnaugh map to generate a simple Boolean expression for this truth table, and dra a

    gate circuit e2uivalent to that expression:

    A B C $ utput

    9 9 9 9 9

    9 9 9 & 9

    9 9 & 9 9

    9 9 & & 9

    9 & 9 9 9

    9 & 9 & 9

    9 & & 9 &

    9 & & & 9

    & 9 9 9 9

    & 9 9 & 9

    & 9 & 9 &

    & 9 & & &

    http://hidecontent%28%27answer_13%27%29/http://hidecontent%28%27answer_13%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    17/21

    & & 9 9 9

    & & 9 & 9

    & & & 9 &

    & & & & &

    0eveal Anser

    +imple expression and gate circuit:

    AC ; BC$

    Challenge 2uestion: use Boolean algebra techni2ues to simplify the table's ra + expression

    into minimal form ithout the use of a !arnaugh map.

    Notes:

    ne of the things you may ant to have your students share in front of the class is their

    !arnaugh maps, and ho they grouped common output states to arrive at Boolean expression

    terms. I have found that an overhead #acetate% or computer-proected image of a blan" !arnaughmap on a hiteboard serves ell to present !arnaugh maps on. (his ay, cell entries may be

    easily erased and re-dran ithout having to re-dra the map #grid lines% itself.

    Hide Anser

    Question 1:

    Gse a !arnaugh map to generate a simple Boolean expression for this truth table, and dra agate circuit e2uivalent to that expression:

    http://showcontent%28%27answer_14%27%29/http://hidecontent%28%27answer_14%27%29/http://showcontent%28%27answer_14%27%29/http://hidecontent%28%27answer_14%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    18/21

    A B C $ utput

    9 9 9 9 9

    9 9 9 & 9

    9 9 & 9 9

    9 9 & & 9

    9 & 9 9 9

    9 & 9 & 9

    9 & & 9 9

    9 & & & 9

    & 9 9 9 &

    & 9 9 & 9

    & 9 & 9 &

    & 9 & & &

    & & 9 9 9

    & & 9 & 9

    & & & 9 &

    & & & & &

    0eveal Anser

    +imple expression and gate circuit:

    AC ; A B

    $

    http://showcontent%28%27answer_15%27%29/http://showcontent%28%27answer_15%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    19/21

    Challenge 2uestion: use Boolean algebra techni2ues to simplify the table's ra + expressioninto minimal form ithout the use of a !arnaugh map.

    Notes:

    ne of the things you may ant to have your students share in front of the class is their

    !arnaugh maps, and ho they grouped common output states to arrive at Boolean expressionterms. I have found that an overhead #acetate% or computer-proected image of a blan" !arnaugh

    map on a hiteboard serves ell to present !arnaugh maps on. (his ay, cell entries may beeasily erased and re-dran ithout having to re-dra the map #grid lines% itself.(his is one of those situations here an important group )raps around) the edge of the

    !arnaugh map, and thus is li"ely to be overloo"ed by students.

    Hide Anser

    Question 16:

    Gse a !arnaugh map to generate a simple Boolean expression for this truth table, and dra a

    relay circuit e2uivalent to that expression:

    A B C $ utput

    9 9 9 9 &

    9 9 9 & 9

    9 9 & 9 9

    9 9 & & 9

    9 & 9 9 &

    9 & 9 & 9

    9 & & 9 &

    http://hidecontent%28%27answer_15%27%29/http://hidecontent%28%27answer_15%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    20/21

    9 & & & 9

    & 9 9 9 &

    & 9 9 & 9

    & 9 & 9 9

    & 9 & & 9

    & & 9 9 &

    & & 9 & 9

    & & & 9 &

    & & & & 9

    0eveal Anser

    +imple expression and relay circuit:

    B$

    ;

    C

    $

    1ollo-up 2uestion: although the relay circuit shon above does satisfy the minimal +

    Boolean expression, there is a ay to ma"e it simpler yet. Hint: done properly, you may

    eliminate one of the contacts in the circuit4Challenge 2uestion: use Boolean algebra techni2ues to simplify the table's ra + expression

    into minimal form ithout the use of a !arnaugh map.

    Notes:

    ne of the things you may ant to have your students share in front of the class is their!arnaugh maps, and ho they grouped common output states to arrive at Boolean expression

    terms. I have found that an overhead #acetate% or computer-proected image of a blan" !arnaugh

    http://showcontent%28%27answer_16%27%29/http://showcontent%28%27answer_16%27%29/
  • 8/12/2019 Karnaugh Map Exercise

    21/21

    map on a hiteboard serves ell to present !arnaugh maps on. (his ay, cell entries may be

    easily erased and re-dran ithout having to re-dra the map #grid lines% itself.

    (his is one of those situations here an important group )raps around) the edge of the!arnaugh map, and thus is li"ely to be overloo"ed by students.

    Hide Anser

    Question 17:

    Gse a !arnaugh map to generate a simple Boolean expression for this truth table, and dra a

    relay circuit e2uivalent to that expression:

    A B C $ utput

    9 9 9 9 &

    9 9 9 & 9

    9 9 & 9 &

    9 9 & & 9

    9 & 9 9 &

    9 & 9 & &

    9 & & 9 &

    9 & & & &

    & 9 9 9 &

    & 9 9 & 9

    & 9 & 9 &

    & 9 & & 9

    & & 9 9 &

    & & 9 & &

    & & & 9 &

    & & & & &

    http://hidecontent%28%27answer_16%27%29/http://hidecontent%28%27answer_16%27%29/