Mind Mangler - A Karnaugh Map Example

download Mind Mangler - A Karnaugh Map Example

of 8

Transcript of Mind Mangler - A Karnaugh Map Example

  • 8/6/2019 Mind Mangler - A Karnaugh Map Example

    1/8

    5/4/11 2:Mind Mangler - a Karnaugh Map Example

    Page ttp://www.generalnumbers.com/karnaugh_application1.html

    A Worked Example

    Problem:Given a Boolean expression:

    F=AB +B'C

    use a Karnaugh map (K-map) to

    minimize.

    Wonderinghow to

    pronounce

    "Karnaughmap?" Click

    here.

    Approach: Determine the size (number of cells) forthe Karnaugh map. To do this, count the

    number of unique variables in the

    expression. Do not countB' (thecomplement ofB) as a separate variable

    fromB. Hence, in AB +B'Cthere

    are 3 variables:A,B, and C.

    Forkvariables, each of which can take

    one of two values (e.g., 1 or 0, true orfalse, high or low voltage), there are 2k

    possible combinations of variable values.

    Here, 2 is the base of the numbersystem, since there are only 2 possible

    values. Hence, for the 3 variables in this

    Side Note: Aleft, the text

    correspondin

    to the numbeof unique

    variables ishighlighted in

    yellow, and

    the textcorrespondin

    to the base o

    the numbersystem is

    highlighted inturquoise.

    Note that

    http://www.generalnumbers.com/karnaugh/karnaugh_map.wavhttp://www.generalnumbers.com/karnaugh/karnaugh_map.wavhttp://www.generalnumbers.com/karnaugh/karnaugh_map.wav
  • 8/6/2019 Mind Mangler - A Karnaugh Map Example

    2/8

    5/4/11 2:Mind Mangler - a Karnaugh Map Example

    Page ttp://www.generalnumbers.com/karnaugh_application1.html

    problem, we must have 23 = 2 x 2 x2 = 8cells in the Karnaugh map to holdall the possible combinations.

    Number of cells in map = 23 =8

    Just in case you are curious, here is atruth table of all 8 combinations, color-

    coded so we can match them up easily

    with the Karnaugh map that we are doingnext:

    Possible Combinations:

    A B C

    1 1 1

    1 1 0

    1 0 1

    1 0 0

    0 1 1

    0 1 0

    0 0 1

    color is not

    used inKarnaugh-

    map-related

    homework,

    although withmore complemaps

    sometimes

    differentcolors are

    used around

    the primeimplicants, fo

    clarity.

    Color is used

    here only as

    aneducational

    aid.

  • 8/6/2019 Mind Mangler - A Karnaugh Map Example

    3/8

    5/4/11 2:Mind Mangler - a Karnaugh Map Example

    Page ttp://www.generalnumbers.com/karnaugh_application1.html

    0 0 0

    Next we examine an empty Karnaugh

    map with 8 cells, this time colored (for

    educational purposes only) to showwhichABCvalue from the above tablecorresponds to which cell. Here the four

    rows represent all the combinations of

    the variablesBC, and the two columnsrepresent all the values that can be taken

    by the remaining variable,A. Note thatthe values ofB and Care in Gray codeorder in the rows.

    We can see that the upper left cell

    corresponds to anABCvalue of 000,

    and the lower right to anABCvalue of110. Inside each cell will go the value of

  • 8/6/2019 Mind Mangler - A Karnaugh Map Example

    4/8

    5/4/11 2:Mind Mangler - a Karnaugh Map Example

    Page ttp://www.generalnumbers.com/karnaugh_application1.html

    F=AB +B'Cfor that cell'sABC

    value.

    Here's an untinted version of the same

    empty 3-variable Karnaugh map. Havingan empty version can be handy, so thatyou can quickly make a new 3-variable

    Karnaugh map without having to redraw

    one each time. To save the image toyour hard drive, right-click on it, and

    depending on your browser, choose"Save Picture As" or an equivalent

    command.

    Now back to the problem. Let's populate

    the empty Karnaugh map with values ofF=AB +B'C, one for each possible

    value ofABC. First make a truth table

    forF, so we can know what values toput in the cells. The leftmost 3 columns

  • 8/6/2019 Mind Mangler - A Karnaugh Map Example

    5/8

    5/4/11 2:Mind Mangler - a Karnaugh Map Example

    Page ttp://www.generalnumbers.com/karnaugh_application1.html

    of the truth table forFare the same asthe truth table above showing all possible

    value combinations forABC.

    Truth Table forF=AB +B'C

    A B C B' AB B'C F=AB +B'C

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

    1 0 1 1 0 1 1

    1 0 0 1 0 0 0

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

    0 0 1 1 0 1 1

    0 0 0 1 0 0 0

    Continuing

    on:

    Here is the 8-cell Karnaugh map, filled with

    the values from the truth table:

  • 8/6/2019 Mind Mangler - A Karnaugh Map Example

    6/8

    5/4/11 2:Mind Mangler - a Karnaugh Map Example

    Page ttp://www.generalnumbers.com/karnaugh_application1.html

    Next, combine prime implicants, which are

    maximal groupings of 1's of sizes that arepowers of 2, such as 1 one, 2 ones, 4 ones,

    8 ones, etc. Here the largest number of 1'sthat is a power of two that we can find in a

    block or straight line is 2. We do have onecolumn of three 1's, but 3 is not an integral

    power of 2, so we can't use that. Twogroupings of 2 ones each is the best we can

    manage.

  • 8/6/2019 Mind Mangler - A Karnaugh Map Example

    7/8

    5/4/11 2:Mind Mangler - a Karnaugh Map Example

    Page ttp://www.generalnumbers.com/karnaugh_application1.html

    The lower circle representsA=1 and

    B=1, with no reference to Csince Ccanbe either 0 or 1. Hence the prime implicant

    represented by the lower circle is AB.

    The upper circle representsB=0 and

    C=1, with no reference toA sinceA canbe either 0 or 1. Hence the prime implicant

    represented by the upper circle isB'C.

    Since there are the only two primeimplicants, the resulting answer for the

    minimized representation of Fis:

    F=AB +B'C

    which is coincidentally the same

    representation we had forFat the start.

    This means that Fwas already in itsminimal form when we started the problem.

    DONE

    For the drawing Smartdraw Professional

    Plus v. 6.2 was used, with the resulting

    screen image captured by Snagit from

  • 8/6/2019 Mind Mangler - A Karnaugh Map Example

    8/8

    5/4/11 2:Mind Mangler - a Karnaugh Map Example

    Page ttp://www.generalnumbers.com/karnaugh_application1.html

    Techsmith.com, and further embellished,

    then optimized for the Web, usingPhotoshop7. The title graphic was done in

    Photoshop 7.

    Copyright 2003 Crystal Sloan and Dr. Yul Williams

    Page Design and Original Graphics Copyright 2003 Crystal Sloan.

    http://www.ertin.com/sloan.html