sop pos.pdf

Upload: desca-tri-paulus

Post on 03-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 SOP POS.pdf

    1/17

    SOP vs. POS

    A sum of products (SOP) expressioncontains:

    Only OR (sum) operations at theoutermost level

    Each term that is summed must be

    a product of literals If any input to OR gate is true then

    f is true

    Aproduct of sums (POS) expressioncontains:

    Only AND (product) operations atthe outermost level

    Each term must be a sum of

    literals If any input to the AND gate is

    false then f is false

    f(x,y,z) = y (x + y + z) (x + z)f(x,y,z) = y + xyz + xz

  • 7/28/2019 SOP POS.pdf

    2/17

    Minterms vs. Maxterms

    A minterm is a special product ofliterals, in which each input variableappears exactly once. Each minterm is true for exactly

    one combination of inputs:

    A maxterm is a sum of literals, inwhich each input variable appearsexactly once.

    Each maxterm is false for exactly onecombination of inputs:

    Minterm Is true when Shorthand

    xyz x=0, y=0, z=0 m0xyz x=0, y=0, z=1 m1xyz x=0, y=1, z=0 m2xyz x=0, y=1, z=1 m3xyz x=1, y=0, z=0 m4xyz x=1, y=0, z=1 m5xyz x=1, y=1, z=0 m6

    xyz x=1, y=1, z=1 m7

    Maxterm Is false when Shorthand

    x + y + z x=0, y=0, z=0 M0x + y + z x=0, y=0, z=1 M1x + y + z x=0, y=1, z=0 M2x + y + z x=0, y=1, z=1 M3x + y + z x=1, y=0, z=0 M4x + y + z x=1, y=0, z=1 M5x + y + z x=1, y=1, z=0 M6

    x + y + z x=1, y=1, z=1 M7

  • 7/28/2019 SOP POS.pdf

    3/17

    Billy's Burger

    Billy will eat a burger with mustard or a burgerwithout mustard, but will not eat mustardwithout a burger. (trivially Billy cannot eat

    without either)

  • 7/28/2019 SOP POS.pdf

    4/17

    Billy's Burger Truth Table

    Billy will eat a burger with mustard or a burgerwithout mustard, but will not eat mustardwithout a burger. (trivially Billy cannot eat

    without either)

    b m e

    0 0 0

    0 1 01 0 1

    1 1 1

  • 7/28/2019 SOP POS.pdf

    5/17

    Billy's Burger - m/M

    Billy will eat a burger with mustard or a burgerwithout mustard, but will not eat mustardwithout a burger. (trivially Billy cannot eat

    without either)

    b m e m/M

    0 0 0 M0

    0 1 0 M11 0 1 m3

    1 1 1 m4

  • 7/28/2019 SOP POS.pdf

    6/17

    Billy's Burger SOP vs. POS

    E = bm'+bm

    True if a burger and nomustard

    E = (1*1)+(1*0)E = 1 + 0 = 1

    True if a burger andmustard

    E = (1*0)+(1*1)

    E = 0 + 1 = 1

    Otherwise false

    E = (b+m).(b+m')

    False if no burger andno mustard

    E = (0+0)(0+1)E = (0)(1) = 0

    False if no burger andmustard

    E = (0+1)(0+0)

    E = (1)(0) = 0

    Otherwise true

  • 7/28/2019 SOP POS.pdf

    7/17

    Minimal Sum of Products

    Minimal sum of products (MSP) form:

    There are a minimal number of product terms in theexpression.

    Each term has a minimal number of literals. Circuit-wise, this leads to a minimal two-level

    implementation.

    What is the MSP for Billy's burger?

  • 7/28/2019 SOP POS.pdf

    8/17

    Minimal Sum of Products

    Minimal sum of products (MSP) form:

    There are a minimal number of product terms in theexpression.

    Each term has a minimal number of literals.

    Circuit-wise, this leads to a minimal two-levelimplementation.

    What is the MSP for Billy's burger?

    Logically we can see that Billy will eat a burger with orwithout ketchup and we can use Boolean Algebra to easilyprove it

    E = bm'+bm = b(m'+m) = b(1) = b

  • 7/28/2019 SOP POS.pdf

    9/17

    Billy's Burger Getting Complicated

    This is just two variables. What if we want tooptimize a function to make Billy a burger, buthave more toppings?

    Ketchup Pickles

    Lettuce

    Tomato

    etc.

  • 7/28/2019 SOP POS.pdf

    10/17

    Karnaugh Map

    The Karnaugh map (K-map for short), Maurice Karnaugh's 1953refinement of Edward Veitch's 1952 Veitch diagram, is a method tosimplify Boolean algebra expressions.

    takes advantage of humans' pattern-recognition capability

    In a Karnaugh map the boolean variables are transferred andordered according to the principles ofGray code

    Once the table is generated and the output possibilities aretranscribed, the data is arranged into the largest possible groupscontaining 2^n cells (n=0,1,2,3...) and the MSP is generated

    through the axiom laws of boolean algebra.

  • 7/28/2019 SOP POS.pdf

    11/17

    Billy's Toppings

    We know Billy will eat a burger plain or with justmustard so we will concentrate on four toppings

    Mustard(m), Ketchup(k), Special Sauce(s), and

    Pickles(p)

    k m p s e k m p s e

    0 0 0 0 1 1 0 0 0

    0 0 0 1 1 0 0 1

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

    0 1 0 0 1 1 1 0 0

    0 1 0 1 1 1 0 1

    0 1 1 0 1 1 1 0

    0 1 1 1 1 1 1 1

  • 7/28/2019 SOP POS.pdf

    12/17

    Billy's Toppings

    We know Billy will eat a burger plain or with justmustard so we will concentrate on four toppings

    Mustard(m), Ketchup(k), Special Sauce(s), and

    Pickles(p)

    k m p s e k m p s e

    0 0 0 0 1 1 0 0 0 0

    0 0 0 1 0 1 0 0 1 0

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

    0 1 0 0 1 1 1 0 0 0

    0 1 0 1 1 1 1 0 1 0

    0 1 1 0 0 1 1 1 0 1

    0 1 1 1 1 1 1 1 1 1

  • 7/28/2019 SOP POS.pdf

    13/17

    Billy's Topping's - m/M

    It is easier to find the minterms and maxtermsof e(k,m,p,s) before transferring it to theKarnaugh Map

    k m p s e m/M k m p s e m/M

    0 0 0 0 1 m0 1 0 0 0 0 M8

    0 0 0 1 0 M1 1 0 0 1 0 M9

    0 0 1 0 0 M2 1 0 1 0 1 m10

    0 0 1 1 0 M3 1 0 1 1 1 m11

    0 1 0 0 1 m4 1 1 0 0 0 M12

    0 1 0 1 1 m5 1 1 0 1 0 M13

    0 1 1 0 0 M6 1 1 1 0 1 m14

    0 1 1 1 1 m7 1 1 1 1 1 m15

  • 7/28/2019 SOP POS.pdf

    14/17

    K-map

    Using the minterms and Maxterms we caneasily fill out the K-map

    P

    m0 m1 m3 m2

    m4 m5 m7 m6M

    Km12 m13 m15 m14

    m8 m9 m11 m10

    S

    P

    M0 M1 M3 M2

    M4

    M5

    M7

    M6 M

    KM12 M13 M15 M14

    M8 M9 M11 M10

    S

    P

    M

    K

    S

    P

    M

    K

    S

  • 7/28/2019 SOP POS.pdf

    15/17

    K-map

    Using the minterms or Maxterms we can easilyfill out the K-map

    P

    m0 m1 m3 m2

    m4 m5 m7 m6M

    Km12 m13 m15 m14

    m8 m9 m11 m10

    S

    P

    M0 M1 M3 M2

    M4 M5 M7 M6M

    KM12 M13 M15 M14

    M8 M9 M11 M10

    S

    P

    1

    1 1 1M

    K1 1

    1 1

    S

    P

    0 0 0

    0M

    K0 0

    0 0

    S

  • 7/28/2019 SOP POS.pdf

    16/17

    K-Map Group and Reduce

    Now we can group terms and reduce them tofind the MSP

    P

    1 0 0 0

    1 1 1 0M

    K0 0 1 1

    0 0 1 1

    S

  • 7/28/2019 SOP POS.pdf

    17/17

    Billy's Toppings - MSP

    An answer would be

    But that answer isn't unique

    How can we tell if something is the MSP?

    Covered on Monday!

    e k , m , p , s =k ' p ' s 'k ' ms ' pk

    e k , m , p , s =k ' p ' s 'k ' mp 'mps pk