Lecture Slides Kmap

download Lecture Slides Kmap

of 72

Transcript of Lecture Slides Kmap

  • 8/12/2019 Lecture Slides Kmap

    1/72

    Chapter 3

    K-Map

  • 8/12/2019 Lecture Slides Kmap

    2/72

    Karnaugh Maps (K-Map)

    A K-Map is a graphical representationof a logic functions truth table

  • 8/12/2019 Lecture Slides Kmap

    3/72

    Relationship to Venn Diagrams

    a b

    ab

    ab ab

    ab

  • 8/12/2019 Lecture Slides Kmap

    4/72

    Relationship to Venn Diagrams

    a b

    0m

    2m 1m

    3m

  • 8/12/2019 Lecture Slides Kmap

    5/72

    Relationship to Venn Diagrams

    0m

    1

    m

    2m

    3mb

    a

  • 8/12/2019 Lecture Slides Kmap

    6/72

    Relationship to Venn Diagrams

    0

    1

    2

    3b

    a

  • 8/12/2019 Lecture Slides Kmap

    7/72

  • 8/12/2019 Lecture Slides Kmap

    8/72

    Two-Variable K-Map

    0 1

    0

    1

    a

    b

  • 8/12/2019 Lecture Slides Kmap

    9/72

    Three-Variable K-Map

    ab

    c 00 01 11 10

    0

    1

    0m

    1m

    2m

    3m

    6m

    7m

    4m

    5m

  • 8/12/2019 Lecture Slides Kmap

    10/72

    Three-Variable K-Map

    ab

    c 00 01 11 10

    0

    1

  • 8/12/2019 Lecture Slides Kmap

    11/72

    Three-Variable K-Map

    ab

    c 00 01 11 10

    0

    1

    Edges are adjacent

  • 8/12/2019 Lecture Slides Kmap

    12/72

    Four-variable K-Map

    abcd 00 01 11 10

    00

    01

    11

    10

    0m

    1m

    2m

    3

    m

    6m

    7

    m

    4m

    5m

    12m

    13m

    14m

    15m

    10m

    11m

    8m

    9m

  • 8/12/2019 Lecture Slides Kmap

    13/72

    Four-variable K-Map

    abcd 00 01 11 10

    00

    01

    11

    10

  • 8/12/2019 Lecture Slides Kmap

    14/72

    Four-variable K-Map

    abcd 00 01 11 10

    00

    01

    11

    10

    Edges are adjacent

    E

    dges

    are

    adja

    cent

  • 8/12/2019 Lecture Slides Kmap

    15/72

    Plotting Functions on theK-map

    SOP Form

  • 8/12/2019 Lecture Slides Kmap

    16/72

    Canonical SOP Form

    Three Variable Example

    F ABC ABC ABC ABC

    using shorthand notation

    6 3 1 5F m m m m

    , , 1, 3, 5, 6F A B C m

  • 8/12/2019 Lecture Slides Kmap

    17/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    , , 1, 3, 5, 6F a b c m

    Plot 1s (minterms) of switching function

    1 1 1

    1

  • 8/12/2019 Lecture Slides Kmap

    18/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    , ,F a b c ab bc

    Plot 1s (minterms) of switching function

    1 1 1

    1 abbc

  • 8/12/2019 Lecture Slides Kmap

    19/72

  • 8/12/2019 Lecture Slides Kmap

    20/72

    Karnaugh Maps (K-Map)

    Simplification of Switching Functions

    using K-MAPS

  • 8/12/2019 Lecture Slides Kmap

    21/72

    Terminology/Definition

    Literal

    A variable or its complement

    Logically adjacent terms

    Two minterms are logically adjacent ifthey differ in only one variable position

    Ex:

    abc abcandm6 and m2 are logically adjacent

    Note: abc abc a a bc bc Or, logically adjacent terms can be combined

  • 8/12/2019 Lecture Slides Kmap

    22/72

    Terminology/Definition

    Implicant Product term that could be used to cover

    minterms of a function

    Prime Implicant An implicant that is not part of another

    implicant

    Essential Prime Implicant An implicant that covers at least one minterm

    that is not contained in another prime

    implicant Cover

    A minterm that has been used in at least onegroup

  • 8/12/2019 Lecture Slides Kmap

    23/72

    Guidelines for Simplifying Functions

    Each square on a K-map of nvariables has n logically adjacentsquares. (i.e. differing in exactly

    one variable) When combing squares, always

    group in powers of 2m, wherem=0,1,2,.

    In general, grouping 2m variableseliminates m variables.

  • 8/12/2019 Lecture Slides Kmap

    24/72

    Guidelines for Simplifying Functions

    Group as many squares as possible.This eliminates the most variables.

    Make as few groups as possible.Each group represents a separateproduct term.

    You must covereach minterm at

    least once. However, it may becovered more than once.

  • 8/12/2019 Lecture Slides Kmap

    25/72

    K-map Simplification Procedure

    Plot the K-map

    Circle allprime implicants on the K-map

    Identify and select all essentialprime implicants for the cover.

    Select a minimum subset of the

    remaining prime implicants tocomplete the cover.

    Read the K-map

  • 8/12/2019 Lecture Slides Kmap

    26/72

    Example

    Use a K-Map to simplify thefollowing Boolean expression

    , , 1, 2, 3, 5, 6F a b c m

  • 8/12/2019 Lecture Slides Kmap

    27/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 1: Plot the K-map

    1 1 1

    1

    , , 1, 2, 3, 5, 6F a b c m

    1

  • 8/12/2019 Lecture Slides Kmap

    28/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 2:Circle ALLPrime Implicants

    1 1 1

    1

    , , 1, 2, 3, 5, 6F a b c m

    1

  • 8/12/2019 Lecture Slides Kmap

    29/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 3: Identify Essential Prime Implicants

    1 1 1

    1

    , , 1, 2, 3, 5, 6F a b c m

    1

    EPI

    EPI

    PI

    PI

  • 8/12/2019 Lecture Slides Kmap

    30/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 4: Select minimum subset of remainingPrime Implicants to complete the cover.

    1 1 1

    1

    , , 1, 2, 3, 5, 6F a b c m

    1

    EPIPI

    EPI

  • 8/12/2019 Lecture Slides Kmap

    31/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 5: Read the map.

    1 1 1

    1

    , , 1, 2, 3, 5, 6F a b c m

    1

    bcab

    bc

  • 8/12/2019 Lecture Slides Kmap

    32/72

    Solution

    , ,F a b c ab bc bc ab b c

  • 8/12/2019 Lecture Slides Kmap

    33/72

    Example

    Use a K-Map to simplify thefollowing Boolean expression

    , , 2, 3, 6, 7F a b c m

  • 8/12/2019 Lecture Slides Kmap

    34/72

  • 8/12/2019 Lecture Slides Kmap

    35/72

  • 8/12/2019 Lecture Slides Kmap

    36/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 3: Identify Essential Prime Implicants

    EPIEPI

    , , 2, 3, 6, 7F a b c m

    11

    11

    Wrong!!

    We reallyshould drawA circle aroundall four 1s

  • 8/12/2019 Lecture Slides Kmap

    37/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 4: Select Remaining Prime Implicants tocomplete the cover.

    EPIEPI

    11

    11

    , , 2, 3, 6, 7F a b c m

  • 8/12/2019 Lecture Slides Kmap

    38/72

  • 8/12/2019 Lecture Slides Kmap

    39/72

    Solution

    , ,F a b c ab ab b

    Since we can still simplify the function

    this means we did not use the largestpossible groupings.

  • 8/12/2019 Lecture Slides Kmap

    40/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 2:Circle Prime Implicants

    11

    11

    , , 2, 3, 6, 7F a b c m

    Right!

  • 8/12/2019 Lecture Slides Kmap

    41/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 3: Identify Essential Prime Implicants

    EPI

    , , 2, 3, 6, 7F a b c m

    11

    11

  • 8/12/2019 Lecture Slides Kmap

    42/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 5: Read the map.

    b

    11

    11

    , , 2, 3, 6, 7F a b c m

  • 8/12/2019 Lecture Slides Kmap

    43/72

    Solution

    , ,F a b c b

  • 8/12/2019 Lecture Slides Kmap

    44/72

    Special Cases

  • 8/12/2019 Lecture Slides Kmap

    45/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    1 1 1

    1

    , , 1F a b c

    11

    1

    1

  • 8/12/2019 Lecture Slides Kmap

    46/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    , , 0F a b c

  • 8/12/2019 Lecture Slides Kmap

    47/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    1

    , ,F a b c a b c

    1

    1

    1

  • 8/12/2019 Lecture Slides Kmap

    48/72

  • 8/12/2019 Lecture Slides Kmap

    49/72

    Example

    Use a K-Map to simplify thefollowing Boolean expression

    , , , 0, 2, 3, 6,8,12,13,15F a b c d m

  • 8/12/2019 Lecture Slides Kmap

    50/72

    Four-variable K-Map

    abcd 00 01 11 10

    00

    01

    11

    10

    , , , 0, 2, 3, 6,8,12,13,15F a b c d m

    1

    1

    1

    1

    11

    1

    1

  • 8/12/2019 Lecture Slides Kmap

    51/72

    Four-variable K-Map

    abcd 00 01 11 10

    00

    01

    11

    10

    0, 2, 3, 6,8,12,13,15F m

    1

    1

    1

    1

    11

    1

    1

  • 8/12/2019 Lecture Slides Kmap

    52/72

    Four-variable K-Map

    abcd 00 01 11 10

    00

    01

    11

    10

    F abd abc acd abd acd

    1

    1

    1

    1

    11

    1

    1

  • 8/12/2019 Lecture Slides Kmap

    53/72

    Example

    Use a K-Map to simplify thefollowing Boolean expression

    , , , 0, 2, 6,8,12,13,15

    3,9,10

    F a b c d m

    d

    D=Dont care (i.e. either 1 or 0)

  • 8/12/2019 Lecture Slides Kmap

    54/72

    Four-variable K-Map

    abcd 00 01 11 10

    00

    01

    11

    10

    1

    1

    d

    1

    11

    1

    1

    , , , 0, 2, 6,8,12,13,15 3, 4, 9F a b c d m d

    d

    d

  • 8/12/2019 Lecture Slides Kmap

    55/72

    Four-variable K-Map

    abcd 00 01 11 10

    00

    01

    11

    10

    1

    1

    d

    1

    11

    1

    1

    F ac ad abd

    d

    d

  • 8/12/2019 Lecture Slides Kmap

    56/72

    Five Variable K-Maps

    , , , ,F a b c d e

  • 8/12/2019 Lecture Slides Kmap

    57/72

    Five variable K-map

    A=1

    A=0

    Use two four variable K-maps

  • 8/12/2019 Lecture Slides Kmap

    58/72

    Use Two Four-variable K-Maps

    bc

    de 00 01 11 10

    00

    01

    11

    10

    bc

    de 00 01 11 10

    00

    01

    11

    10

    A=0 map A=1 map

  • 8/12/2019 Lecture Slides Kmap

    59/72

    Five variable example

    , , , , 5, 7,13,15, 21, 23, 29, 31F a b c d e m

  • 8/12/2019 Lecture Slides Kmap

    60/72

    Use Two Four-variable K-Maps

    bc

    de 00 01 11 10

    00

    01

    11

    10

    bc

    de 00 01 11 10

    00

    01

    11

    10

    A=0 map A=1 map

    , , , , 5, 7,13,15, 21, 23, 29, 31F a b c d e m

    1

    1

    1

    1

    1

    1

    1

    1

  • 8/12/2019 Lecture Slides Kmap

    61/72

    Use Two Four-variable K-Maps

    bc

    de 00 01 11 10

    00

    01

    11

    10

    bc

    de 00 01 11 10

    00

    01

    11

    10

    A=0 map A=1 map

    1

    1

    1

    1

    1

    1

    1

    1

    1F a ce 2F a ce

  • 8/12/2019 Lecture Slides Kmap

    62/72

    Five variable example

    1 2F F F a ce a ce ce

  • 8/12/2019 Lecture Slides Kmap

    63/72

  • 8/12/2019 Lecture Slides Kmap

    64/72

    K-map Simplification Procedure

    Plot the K-map for the function F

    Circle allprime implicants on the K-map

    Identify and select all essential prime

    implicants for the cover. Select a minimum subset of the

    remaining prime implicants to completethe cover.

    Read the K-map

    Use DeMorgans theorem to convert F to Fin POS form

  • 8/12/2019 Lecture Slides Kmap

    65/72

    Example

    Use a K-Map to simplify thefollowing Boolean expression

    , , 1, 2, 3, 5, 6F a b c M

  • 8/12/2019 Lecture Slides Kmap

    66/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 1: Plot the K-map of F

    11

    1

    11

    , , 1, 2, 3, 5, 6F a b c M

  • 8/12/2019 Lecture Slides Kmap

    67/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 2:Circle ALLPrime Implicants

    11

    1

    11

  • 8/12/2019 Lecture Slides Kmap

    68/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 3: Identify Essential Prime Implicants

    11

    1

    11

    EPI

    EPI

    PI

    PI

  • 8/12/2019 Lecture Slides Kmap

    69/72

    Three-Variable K-Map Example

    ab

    c 00 01 11 10

    0

    1

    Step 4: Select minimum subset of remainingPrime Implicants to complete the cover.

    11

    1

    11

    EPIPI

    EPI

  • 8/12/2019 Lecture Slides Kmap

    70/72

  • 8/12/2019 Lecture Slides Kmap

    71/72

    Solution

    F ab bc bc

    F ab bc bc

    a b b c b c

    , , 1, 2, 3, 5, 6F a b c M

  • 8/12/2019 Lecture Slides Kmap

    72/72