You are on page 1of 17

SOP vs.

POS

A sum of products (SOP) expression contains:

A product of sums (POS) expression contains:

Only OR (sum) operations at the outermost level Each term that is summed must be a product of literals If any input to OR gate is true then f is true f(x,y,z) = y + xyz + xz

Only AND (product) operations at the 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)

Minterms vs. Maxterms

A minterm is a special product of literals, in which each input variable appears exactly once. Each minterm is true for exactly one combination of inputs:

A maxterm is a sum of literals, in which each input variable appears exactly once. Each maxterm is false for exactly one combination of inputs:

Minterm xyz xyz xyz xyz xyz xyz xyz xyz

Is true when x=0, y=0, z=0 x=0, y=0, z=1 x=0, y=1, z=0 x=0, y=1, z=1 x=1, y=0, z=0 x=1, y=0, z=1 x=1, y=1, z=0 x=1, y=1, z=1

Shorthand m0 m1 m2 m3 m4 m5 m6 m7

Maxterm x+y+z x + y + z x + y + z x + y + z x + y + z x + y + z x + y + z x + y + z

Is false when Shorthand x=0, y=0, z=0 M0 x=0, y=0, z=1 M1 x=0, y=1, z=0 M2 x=0, y=1, z=1 M3 x=1, y=0, z=0 M4 x=1, y=0, z=1 M5 x=1, y=1, z=0 M6 x=1, y=1, z=1 M7

Billy's Burger

Billy will eat a burger with mustard or a burger without mustard, but will not eat mustard without a burger. (trivially Billy cannot eat without either)

Billy's Burger Truth Table

Billy will eat a burger with mustard or a burger without mustard, but will not eat mustard without a burger. (trivially Billy cannot eat without either)
b 0 0 1 1 m 0 1 0 1 e 0 0 1 1

Billy's Burger - m/M

Billy will eat a burger with mustard or a burger without mustard, but will not eat mustard without a burger. (trivially Billy cannot eat without either)
b 0 0 1 1 m 0 1 0 1 e 0 0 1 1 m/M M0 M1 m3 m4

Billy's Burger SOP vs. POS

E = bm'+bm True if a burger and no mustard

E = (b+m).(b+m') False if no burger and no mustard

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

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

True if a burger and mustard

False if no burger and mustard


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

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

Otherwise false

Otherwise true

Minimal Sum of Products

Minimal sum of products (MSP) form:

There are a minimal number of product terms in the expression. 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?

Minimal Sum of Products

Minimal sum of products (MSP) form:

There are a minimal number of product terms in the expression. 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?

Logically we can see that Billy will eat a burger with or without ketchup and we can use Boolean Algebra to easily prove it E = bm'+bm = b(m'+m) = b(1) = b

Billy's Burger Getting Complicated

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

Ketchup Pickles Lettuce Tomato etc.

Karnaugh Map

The Karnaugh map (K-map for short), Maurice Karnaugh's 1953 refinement of Edward Veitch's 1952 Veitch diagram, is a method to simplify Boolean algebra expressions. takes advantage of humans' pattern-recognition capability In a Karnaugh map the boolean variables are transferred and ordered according to the principles of Gray code Once the table is generated and the output possibilities are transcribed, the data is arranged into the largest possible groups containing 2^n cells (n=0,1,2,3...) and the MSP is generated through the axiom laws of boolean algebra.

Billy's Toppings

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

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


k 0 0 0 0 0 0 0 0 m 0 0 0 0 1 1 1 1 p 0 0 1 1 0 0 1 1 s 0 1 0 1 0 1 0 1 1 e 1 k 1 1 1 1 1 1 1 1 m 0 0 0 0 1 1 1 1 p 0 0 1 1 0 0 1 1 s 0 1 0 1 0 1 0 1 e

Billy's Toppings

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

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


k 0 0 0 0 0 0 0 0 m 0 0 0 0 1 1 1 1 p 0 0 1 1 0 0 1 1 s 0 1 0 1 0 1 0 1 e 1 0 0 0 1 1 0 1 k 1 1 1 1 1 1 1 1 m 0 0 0 0 1 1 1 1 p 0 0 1 1 0 0 1 1 s 0 1 0 1 0 1 0 1 e 0 0 1 1 0 0 1 1

Billy's Topping's - m/M

It is easier to find the minterms and maxterms of e(k,m,p,s) before transferring it to the Karnaugh Map
k 0 0 0 0 0 0 0 0 m 0 0 0 0 1 1 1 1 p 0 0 1 1 0 0 1 1 s 0 1 0 1 0 1 0 1 e 1 0 0 0 1 1 0 1 m/M m0 M1 M2 M3 m4 m5 M6 m7 k 1 1 1 1 1 1 1 1 m 0 0 0 0 1 1 1 1 p 0 0 1 1 0 0 1 1 s 0 1 0 1 0 1 0 1 e 0 0 1 1 0 0 1 1 m/M M8 M9 m10 m11 M12 M13 m14 m15

K-map

Using the minterms and Maxterms we can easily fill out the K-map
P m0 m4 m12 m8 m1 m5 m13 m9 S m3 m7 m15 m11 m2 m6 m14 m10 M K M0 M4 M12 M8 M1 M5 M13 M9 S M3 M7 M15 M11 P M2 M6 M M14 M10

P M K S K S

P M

K-map

Using the minterms or Maxterms we can easily fill out the K-map
P m0 m4 m12 m8 m1 m5 m13 m9 S m3 m7 m15 m11 m2 m6 m14 m10 M K M0 M4 M12 M8 M1 M5 M13 M9 S M3 M7 M15 M11 P M2 M6 M M14 M10

P 1 1 K S 1 1 1 1 0 1 1 M K 0 0 0 0 S 0

P 0 0 M

K-Map Group and Reduce

Now we can group terms and reduce them to find the MSP
P 1 1 0 0 0 1 0 0 S 0 1 1 1 0 0 1 1 M

Billy's Toppings - MSP

An answer would be

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

But that answer isn't unique

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

How can we tell if something is the MSP?

Covered on Monday!

You might also like