chap_02_p2b quine mc cluskey

Upload: omar-jacobo-garcia

Post on 14-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    1/27

    Quine-McCluskey (Tabular) Minimization

    Two step process utilizing tabular listings to: Identify prime implicants (implicant tables)

    Identify minimal PI set (cover tables) All work is done in tabular form

    Number of variables is not a limitation

    Basis for many computer implementations Dont cares are easily handled Proper organization and term identification are

    key factors for correct results

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    2/27

    2

    DifficultyNote: Can be 2n minterms ~ 3n/n primes

    Thus O(2n) rows and O(3n/n ) columns AND minimum covering problemis NP-complete. Hence can probably be double exponential in size ofinput, i.e. difficulty is O(23n)

    0

    1

    0

    0

    10

    3n/n

    minterms

    primes

    2n

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    3/27

    3

    Example

    Primes: y + w +xz

    Covering Table

    Solution: {1,2} y + w is minimum prime cover.

    (also w +xz)

    F x y z w x y zw x y zw x yzw

    D yz xyw x y zw x y w x y z w

    dd

    ddd

    dd

    dd

    00

    1

    11

    01

    xy xy xy xy

    zw

    z w

    z w

    zw

    xz

    wKarnaugh map

    010

    011

    110

    101

    y w xz

    xyz w

    x y z w

    x yz w

    xyzw

    y

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    4/27

    4

    Covering Table

    Definition: An essential prime is any prime that uniquelycovers a minterm of f.

    010

    011

    110

    101

    y w xz

    xyz w

    x y z w

    x yz w

    xyzw

    Primes of f+d

    Minterms of f

    Essential prime

    Row singleton(essential minterm)

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    5/27

    Quine-McCluskey Minimization (cont.)

    Terms are initially listed one per line in groups Each group contains terms with the same number of true

    and complemented variables Terms are listed in numerical order within group

    Terms and implicants are identified using one ofthree common notations

    full variable form cellular form 1,0,- form

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    6/27

    Example of Different Notations

    F(A, B, C, D) = m(4,5,6,8,10,13)

    1 ABCD 4 0100

    ABCD 8 1000

    2 ABCD 5 0101

    ABCD 6 0110

    ABCD 10 1010

    3 ABCD 13 1101

    Full variable Cellular 1,0,-

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    7/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    8/27

    Implication Table (1,0,-)

    Quine-McCluskey Method Tabular method to

    systematically find all primeimplicants

    (A,B,C,D) = m(4,5,6,8,9,10,13) + d(0,7,15)

    Part 1: Find all prime implicants Step 1: Fill Column 1 with

    active-set and DC-set mintermindices. Group by number oftrue variables (# of 1s).

    Implication Table

    Column I

    0000

    01001 000

    0101011010011010

    0 1 1 11101

    1111NOTE: DCs are included in this step!

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    9/27

    Minimization - First Pass (1,0,-)

    Quine-McCluskey Method Tabular method to systematically find

    all prime implicants

    (A,B,C,D) = m(4,5,6,8,9,10,13) + d(0,7,15)

    Part 1: Find all prime implicants

    Step 2: Apply Adjacency - Compareelements of group with N 1's againstthose with N+1 1's. One bit differenceimplies adjacent. Eliminate variableand place in next column.

    E.g., 0000 vs. 0100 yields 0-00

    0000 vs. 1000 yields -000

    When used in a combination, mark witha check. If cannot be combined, markwith a star. These are the primeimplicants.

    Repeat until nothing left.

    Implication Table

    Column I0000

    0100 1000

    0101

    0110 1001 1010

    0111

    1101

    1111

    Column II0-00-000

    010-01-0100-

    10-0

    01-1-101011-

    1-01

    -11111-1

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    10/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    11/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    12/27

    Stage 2: find smallest set of prime implicants that cover theactive-setrecall that essential prime implicants must be in

    final expression

    Prime Implicants (cont.)

    Prime Implicants:

    DCA00-0

    CBA-100

    DCB000-

    DBA0-10

    DCA01-1 DB1-1-

    BA--01

    X 1 0 1

    0 1 1 1

    0 X X 0

    0 1 0 1

    AB

    00 01 11

    01

    11

    10C

    CD

    A

    D

    B

    00

    10

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    13/27

    rows = prime implicantscolumns = ON-set elements

    place an "X" if ON-set element is covered by the prime implicant

    Coverage Chart

    0,4 0-00

    0,8 -000

    8,9 100-

    8,10 10-0

    9,13 1-01

    4,5,6,7 01--

    5,7,13,15 -1-1

    4X

    X

    5

    X

    X

    6

    X

    8

    X

    X

    X

    9

    X

    X

    10

    X

    13

    X

    X

    Coverage Table

    Note: Dont include DCs in coveragetable; they dont have covered by thefinal logic expression!

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    14/27

    14

    Row and Column Dominance Definition: A row i2 whose set of primes is contained in the set of

    primes of row i1 is said to be dominated.

    Example:i1 x x x x x xi2 x x x x

    i1 dominates i2

    We can remove row i2, because covering i1, i2 is automaticallycovered.

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    15/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    16/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    17/27

    Coverage Table (cont.)

    rows = prime implicantscolumns = ON-set elementsplace an "X" if ON-set element is

    covered by the prime implicant

    If column has a single X, than theimplicant associated with the rowis essential. It must appear inminimum cover

    0,4 0-00

    0,8 -000

    8,9 100-

    8,10 10-0

    9,13 1-01

    4,5,6,7 01--

    5,7,13,15 -1-1

    4X

    X

    5

    X

    X

    6

    X

    8

    X

    X

    X

    9

    X

    X

    10

    X

    13

    X

    X

    0,4 0-00

    0,8 -000

    8,9 100-

    8,10 10-0

    9,13 1-01

    4,5,6,7 01--

    5,7,13,15 -1-1

    4X

    X

    5

    X

    X

    6

    X

    8

    X

    X

    X

    9

    X

    X

    10

    X

    13

    X

    X

    Coverage Chart

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    18/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    19/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    20/27

    20

    Cyclic Core

    110

    011

    101

    456

    CyclicCore

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    21/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    22/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    23/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    24/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    25/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    26/27

  • 7/29/2019 Chap_02_P2b Quine Mc Cluskey

    27/27