SLIDE 6 6
Representing Boolean Functions
Problem: Given the values of F, find an expression for F. e.g.
k h l 1 l
Lecture Set 9 - Chpts 11.1, 11.2, 11.3 31
Fxy x y 1 1 1 1 1
F takes the value 1 only on the string 1,1 i.e. Fx,y1 x1 AND y1 xy1 Choose Fx,yxy
Recall the relationship between AND & ·
More Examples
Problem: Given the values of F, find an expression for F. Fxy x y 1 1 1
F takes the value 1 only on the string 1,0 i.e. Fx,y1 x1 AND y0 x¬y1
Lecture Set 9 - Chpts 11.1, 11.2, 11.3 32
1 1
y Choose Fx,yx¬y
Fxy x y 1 1 1 1 1
Fx,y1 x0 AND y0 ¬x ¬y 1 Choose Fx,y ¬x ¬y
Another Example
x y z 1 1
Fx,y,z Fx,y,z1 x0, y1, z1
Lecture Set 9 - Chpts 11.1, 11.2, 11.3 33
1 1 1 1 1 1 1 1 1 1 1 1
Choose Fx,y¬x·y·z
In General..
If Fx1, x2 ,.., xn1 on a single string then F can be represented as a “minterm” i.e. a product y1 y2 … yn where each yi is either xi or xi. More precisely, if the string is 011…10…1 Then, look at : Th ith t hi h i ith 1 The ith entry which is either 0 or 1 If the ith entry is 1, chose yi xi If the ith entry is 0, chose yi xi For example: If F0 except on 10010 then Fx1, x2, x3, x4, x5 1 x11, x20, x30, x41, x50 x1· x2 ·x3· x4 · x51
34
Proof
Fx1, x2, x3, x4, x5 1 x1, x2, x3, x4, x510010 x11, x20, x30, x41, x50 x1x2 x3 x4 x51
1 2 3 4 5
x1· x2 ·x3· x4 · x51
⇒ You can choose
Fx1, x2, x3, x4, x5 x1· x2 ·x3· x4 · x5
Q.E.D
Lecture Set 9 - Chpts 11.1, 11.2, 11.3 35
What about this function?
Fxy x y 1 1 1 1
We see that Fx,y 1 x0, y1 OR x1, y0 xy1 OR x y1 xy1 OR x y1 xy x y
1 1
Lecture Set 9 - Chpts 11.1, 11.2, 11.3 36
y y So we can choose Fx,y xy x y In General, give the values of F, you can:
- 1. Write down all the strings on which F1
- 2. each string gives you a “minterm” like before
- 3. take the sum of these minterms
the result is an expression for F