Sie sind auf Seite 1von 17

SOP vs. POS

A sum of products (SOP) expression contains:

Only OR (sum) operations at the “outermost” level

A product of sums (POS) expression contains:

Only AND (product) operations at the “outermost” level

Each term that is summed must be

Each term must be a sum of

a

product of literals

literals

any input to OR gate is true then

If

If any input to the AND gate is

f is true

false then f is false

f(x,y,z) = y’ + x’yz’ + xz

is f is true false then f is false f(x,y,z) = y’ + x’yz’ + xz

f(x,y,z) = y’ (x’ + y + z’) (x + z)

is f is true false then f is false f(x,y,z) = y’ + x’yz’ + xz

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:

Minterm

Is true when…

x’y’z’

x=0, y=0, z=0

x’y’z

x=0, y=0, z=1

x’yz’

x=0, y=1, z=0

x’yz

x=0, y=1, z=1

xy’z’

x=1, y=0, z=0

xy’z

x=1, y=0, z=1

xyz’

x=1, y=1, z=0

xyz

x=1, y=1, z=1

Shorthand m 0 m 1 m 2 m 3 m 4 m 5 m 6 m 7

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:

Maxterm

 

Is false when…

x

+ y + z

x=0, y=0, z=0

x

+ y + z’

x=0, y=0, z=1

x

+ y’ + z

x=0, y=1, z=0

x

+ y’ + z’

x=0, y=1, z=1

x’ + y + z

x=1, y=0, z=0

x’ + y + z’

x=1, y=0, z=1

x’ +

y’ +

z

x=1, y=1, z=0

x’ + y’ + z’

x=1, y=1, z=1

Shorthand M 0 M 1 M 2 M 3 M 4 M 5 M 6 M 7

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

m

e

0

0

0

0

1

0

1

0

1

1

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

m

e

m/M

0

0

0

M0

0

1

0

M1

1

0

1

m3

1

1

1

m4

Billy's Burger – SOP vs. POS

E = bm'+bm

True if a burger and no mustard

E

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

E

= 1 + 0 = 1

True if a burger and mustard

E

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

E

= 0 + 1 = 1

Otherwise false

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

False if no burger and no mustard

E

= (0+0)(0+1)

E

= (0)(1) = 0

False if no burger and mustard

= (0+1)(0+0)

= (1)(0) = 0

E

E

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

through the axiom laws of boolean algebra.

)

and the MSP is generated

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

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

0

 

0

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

 

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

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

1

0

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

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

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

K-map

Using the minterms and Maxterms we can easily fill out the K-map

   

P

 
 

m

0

m

1

m

3

m

2

 

m

4

m

5

m

7

m

6

M

K

m

12

m

13

m

15

m

14

m

8

m

9

m

11

m

10

 
   

S

   
   

P

 
         

M

         

K

         
   

S

   
P M M M M 0 1 3 2 M M M M 4 5
P
M
M
M
M
0
1
3
2
M
M
M
M
4
5
7
6
M
M
M
M
M
12
13
15
14
K
M
M
M
M
8
9
11
10
S
P
M
K
S

K-map

Using the minterms or Maxterms we can easily fill out the K-map

   

P

 
 

m

0

m

1

m

3

m

2

 

m

4

m

5

m

7

m

6

M

K

m

12

m

13

m

15

m

14

m

8

m 9

m

11

m

10

 
   

S

   
   

P

 
 

1

       

1

 

1 1

   
     

1

1

M

K

   

1

1

   

S

   

P

M

0

M

1

M

3

M

2

M

4

M

5

M

7

M

6

M

M 13

M

15

M

14

K M 12

M 8

M 9

M

11

M

10

S

P

0

0

0

0

M

K

0

0

0

0

S

K-Map – Group and Reduce

Now we can group terms and reduce them to find the MSP

P

1

0

0

0

1

1

1

0

M

K

0

0

1

1

0

0

1

1

S

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!