mvi function review

24
MVI Function Review Input X is p-valued variable. Each Input can have Value in Set {0, 1, 2, ..., p i-1 } literal over X corresponds to subset of values of S {0, 1, ... , p-1} denoted by X S or X {j} where j is the logic value Empty Literal: X {} Full Literal has Values S={0, 1, 2, …, p-1} X {0,1,…,p-1} Equivalent to Don’t Care 1 :{0,1,..., } {0,1, } i F p X

Upload: moe

Post on 07-Feb-2016

61 views

Category:

Documents


0 download

DESCRIPTION

MVI Function Review. Input X is p -valued variable. Each Input can have Value in Set {0, 1, 2, ..., p i- 1 } literal over X corresponds to subset of values of S  {0, 1, ... , p- 1} denoted by X S or X { j } where j is the logic value Empty Literal: X { } - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: MVI Function Review

MVI Function Review• Input X is p-valued variable. Each Input can have Value in Set {0, 1, 2, ..., pi-1}

• literal over X corresponds to subset of values of S {0, 1, ... , p-1} denoted by XS or X{j} where j is the logic value

• Empty Literal: X{}

• Full Literal has Values S={0, 1, 2, …, p-1}

X{0,1,…,p-1} Equivalent to Don’t Care

1:{0,1,..., } {0,1, }iF p X

Page 2: MVI Function Review

SOP Bit RepresentationSOP Bit Representation

X1 X2 X3

01 – 012 – 012311 – 100 – 100011 – 010 – 010111 – 001 – 001001 – 110 – 0001

c = X1S

1 X2S

2 . . . XnS

n , Si Pi

Cube in an n-dimensional hyper-cube

Page 3: MVI Function Review

Cofactor Cofactor for MVfor MV

Page 4: MVI Function Review

Restriction (Cofactor) Operation Restriction (Cofactor) Operation in MV cube calculusin MV cube calculus

Restriction of Two-Valued Output Function F obtained by restricting Domain to D, denoted by F(|D)

For SOP, the restriction is defined as follows:

Let F be a SOP, and c = X1S

1 X2S

2 . . . XnS

n be a product. Then, the restriction F(|c) of F to c is obtained as follows:

(1) For each product term in F, make a logical product with c. Delete the zero terms.

(2) Let d = X1T

1 X2T

2 . . . XnT

n be a product obtained in (1). Replace d with X1(T

1

S1

) X2

(T2 S

2) . . . Xn

(Tn S

n)

Page 5: MVI Function Review

Procedure for Finding F(|c)11 – 100 – 100011 – 010 – 010111 – 001 – 001001 – 110 – 0001

F = c = (01-101-1111)

Step 1: Bit-wise AND each product term in F with c01 – 100 – 100001 – 001 – 001001 – 100 – 0001

F c =

Step 2: Bit-wise OR each product term in F c with c

F(|c) =11 – 110 – 100011 – 011 – 001011 – 110 – 0001 Students: check this in

maps and equations

Page 6: MVI Function Review

Cofactor ConceptBy Shannon’s Expansion

f (x1, x2 , . . , xn ) = x1 f (0, x2 , . . , xn ) + x1 f (1, x2 , . . , xn )

F(|c0) F(|c1)

Where c0 and c1 are cubes with x1 =0 and x1 =1, respectively.

Example: f = xy + yz + zx F =

x y z 01 – 01 – 1111 – 01 – 0101 – 11 – 01f (0,y,z)

c0= (10-11-11)

F c0 = [10- 01- 01]

F(|c0) = [11- 01- 01]

f (1,y,z)c1= (01-11-11)

F c1= F(|c1) =01 – 01 – 1101 – 01 – 0101 – 11 – 01

11 – 01 – 1111 – 01 – 0111 – 11 – 01

Students: check this in maps and equations

Page 7: MVI Function Review

Tautology Tautology for MVfor MV

Page 8: MVI Function Review

Tautology for MV

When the logical expression F is equal to logical 1 for all the input combinations, F is a tautology.Tautology Decision Problem - determining if logical expression is or is not a tautology

F1 =01 – 100 – 110011 – 111 – 0010

11 – 110 – 111011 – 110 – 000111 – 001 – 1111

F2 =

Z0 1 2 3

Example: No Yes

Y 0 1 2 0 1 2

X = 0

X = 1

Can confirm with K-Maps

Page 9: MVI Function Review

Inclusion Relation for MV

Let F and G be logic functions. For all the minterms c such that F(c) = 1 , if G(c) = 1, then F G , and G contains F. If F contains a product c then c is an implicant of F.

11 – 100 – 100011 – 010 – 010111 – 001 – 001001 – 110 – 0001

F = Example:

c1= (01- 100 - 1001)

F(|c1) =11 – 111 – 111011 – 111 – 0111

F(|c1) 1, c1 F

c2= (11- 010 - 1101)

F(|c2) =11 – 111 – 011101 – 111 – 0011

F(|c2) 1, c2 F

Page 10: MVI Function Review

Equivalence RelationLet

F = fj and G = gj

then

F G F(|gj) 1 (j = 1, . . , q) and G(|fj) 1 (i = 1, . . , p)

Example: F = xy + y and G = x + xy

i = 1 j = 1

p q

F(|x) 1, F(|xy) 1, G(|xy) 1, and G(|y) 1, Thus F G

Page 11: MVI Function Review

Divide and Divide and Conquer Conquer MethodMethod

Page 12: MVI Function Review

Divide and Conquer Method

Let F be a SOP and ci (i = 1, 2,. . , k) be the cubes satisfying the following conditions:

F = ci 1 and ci cj = 0 (i j ).

Then, can partition SOP into k SOPs

F = ci F(|ci)

Operations can be done on each F(|ci) independently and then combined to get result on F

i = 1

k

i = 1

k

This was already illustrated graphically to check SAT, TAUTOLOGY and other similar

Page 13: MVI Function Review

Divide and Conquer Method

Let t(F) be the number of products in an SOP F. We can use Divide and Conquer Theorem to minimize

t(F(|ci) )

and thus the number of products.Partition Example:

k = 2, c1 = XjS

A , c2 = XjS

B

SA SB = Pj and SA SB =

i = 1

k

Page 14: MVI Function Review

Divide and Conquer MethodUsing Divide and Conquer we use the recursive application of the restriction operation to attempt to get columns of all 0’s or 1’s (they can be ignored). A column with both 0 and 1 is active.

Selection MethodSelection Method:1. Chose all the variables with the

maximum number of active columns 12. Among the variables chosen in step 1,

choose variables where the total sum of 0’s in the array is maximum

3. For all variables in step 2, find a column that has the maximum number of 0’s and from among them choose the one with the minimum number of 0’s

Page 15: MVI Function Review

Divide and Conquer MethodExample:

X2 and X3 have the largest number of active columns.

Choose X3 and let SA = {0,1} and SB = {2,3}

X1 X2 X3

11 – 100 – 100011 – 010 – 010011 – 001 – 001001 – 110 – 0001

F =

c1= (11- 111 - 1100)

F(|c1) =11 – 100 – 101111 – 010 – 0111

F(|c2) =11 – 001 – 111001 – 110 – 1101

c2= (11- 111 - 0011)

We split with respect to some values, like cutting a KMAP in our previous examples

Page 16: MVI Function Review

Complementation Complementation of SOPSof SOPS

Page 17: MVI Function Review

Complementation of SOPS

Let

F = ci 1 and ci cj = 0 (i j ).

Then, the complement of F is

F = ci F(|ci)

i = 1

k

i = 1

k

Page 18: MVI Function Review

Algorithm for Complementation of SOPS

1. F consist of one product c

F = X1S

1 X2S

2 . . . XnS

n

Then

F = X1S

1 + X1S

1 X2S

2 + . . . + X1S

1 X2S

2 . . . Xn-1S

n-1 XnS

n

2. F consist of more than one product

Expand F into F = c1 F(|c1) + c2 F(|c2) , where

c1 = XjS

A , c2 = XjS

, SA SB = Pj and SA SB =

F = c1 F(|c1) + c2 F(|c2)

Page 19: MVI Function Review

Complementation of SOPS Example

1. Expand F w.r.t. X3 and let SA = {0,1} and SB = {2,3}

X1 X2 X3

11 – 100 – 100011 – 010 – 010011 – 001 – 001101 – 110 – 0001

F =

c1= (11- 111 - 1100)

F1= F(|c1) =11 – 100 – 101111 – 010 – 0111

F2= F(|c2) =11 – 001 – 111101 – 110 – 1101

c2= (11- 111 - 0011)

Page 20: MVI Function Review

Complementation of SOPS Example (Continued)

F1= F(|c1) =

11 – 111 – 1011 11 – 110 – 0111

2. Next, expand F1 variable X2 , F1 = c3 F1 (|c3) + c4 F1 (|c4)

c3= (11- 100 - 1111)

F3= F(|c3) = F4= F(|c4) =

c4= (11- 011 - 1111)

11 – 100 – 101111 – 010 – 0111

Page 21: MVI Function Review

Complementation of SOPS Example (Continued)

F2= F(|c2) =

01 – 111 – 1101 11 – 111 – 1111

3. Next, expand F2 variable X2 , F2 = c5 F2 (|c5) + c6 F2 (|c6)

c5= (11- 110 - 1111)

F5= F(|c5) = F6= F(|c6) =

c6= (11- 001 - 1111)

11 – 001 – 111101 – 110 – 1101

Page 22: MVI Function Review

Complementation of SOPS Example (Continued)

4. F3 through F6 are single products so we apply alg. Step 1.

11 – 111 – 0100F3=

10 – 111 – 111101 – 111 - 0010

F5=

11 – 001 – 111111 – 110 – 1000

F4=

F6= 0

11 – 111 – 1011F3=

01 – 111 – 1101F5=11 – 110 – 0111F4=

11 – 111 – 1111F6=

Page 23: MVI Function Review

Complementation of SOPS Example (Completed)

5. Combining all the products gives:

F=

11 – 100 – 010011 – 001 – 110011 – 010 – 100010 – 110 – 001101 – 110 - 0010

F = c1F1 + c2F2 = c1(c3F3 + c4F4 ) + c2 (c5F5 + c6F6 )

= c1c3F3 + c1c4F4 + c2 c5F5 + c2 c6F6

Page 24: MVI Function Review

Problems to remember and solveProblems to remember and solve

1. Multi-output Multi-valued prime implicants2. Covering for MV functions.3. Cofactors of MV functions.4. Visualization of MV functions5. Complementation of MV functions.6. Decision trees and Decision Diagrams for MV functions7. Cube Calculus operations and Algorithms for MV functions.