This preview shows pages 1–6. Sign up to view the full content.
CS231 Boolean Algebra
1
Example Kmap simplification
•
Let’s consider simplifying
f(x,y,z) = xy + y’z + xz
.
•
First, you should convert the expression into a sum of minterms form, if it’s not already.
–
The easiest way to do this is to make a truth table for the function, and then read off the
minterms.
–
You can either write out the literals or use the minterm shorthand.
•
Here is the truth table and sum of minterms for our example:
x
y
z
f (x,y,z)
0
0
0
0
0
0
1
1
0
1
0
0
0
1
1
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
1
f(x,y,z)
=
x’y’z
+
xy’z
xyz’
xyz
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document CS231 Boolean Algebra
2
Unsimplifying expressions
•
You can also convert the expression to a sum of minterms with Boolean algebra.
–
Apply the distributive law in reverse to add in missing variables.
–
Very few people actually do this, but it’s occasionally useful.
•
In both cases, we’re actually “unsimplifying” our example expression.
–
The resulting expression is larger than the original one!
–
But having all the individual minterms makes it easy to combine them together with the K
map.
xy + y’z + xz = (xy
•
1) + (y’z
•
1) + (xz
•
1)
= (xy
•
(z’ + z)) + (y’z
•
(x’ + x)) + (xz
•
(y’ + y))
= (xyz’ + xyz) + (x’y’z + xy’z) + (xy’z + xyz)
=
xyz’ + xyz + x’y’z + xy’z
CS231 Boolean Algebra
3
Making the example Kmap
•
Next up is drawing and filling in the Kmap.
–
Put 1s in the map for each minterm, and 0s in the other squares.
–
You can use either the minterm products or the shorthand to show you where the 1s and 0s belong.
•
In our example, we can write f(x,y,z) in two equivalent ways.
•
In either case, the resulting Kmap is shown below.
Y
0
1
0
0
X
0
1
1
1
Z
Y
x y z
x y z
x yz
x yz
X
xy z
xyz
Z
f(x,y,z) =
x’y’z
+
xy’z
xyz’
Y
m
0
m
1
m
3
m
2
X
m
4
m
5
m
7
m
6
Z
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document CS231 Boolean Algebra
4
Kmaps from truth tables
•
You can also fill in the Kmap directly from a truth table.
–
The output in row i of the table goes into square m
i
of the Kmap.
–
Remember that the rightmost columns of the Kmap are “switched.”
Y
m
0
m
1
m
3
m
2
X
m
4
m
5
m
7
m
6
Z
x
y
z
f (x,y,z)
0
0
0
0
0
0
1
1
0
1
0
0
0
1
1
0
1
0
0
0
1
0
1
1
1
1
0
1
1
1
1
1
Y
0
1
0
0
X
0
1
1
1
Z
CS231 Boolean Algebra
5
Grouping the minterms together
•
The most difficult step is grouping together all the 1s in the Kmap.
–
Make
rectangles
around groups of one, two, four or eight 1s.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 04/15/2008 for the course CS 231 taught by Professor  during the Spring '08 term at University of Illinois at Urbana–Champaign.
 Spring '08
 

Click to edit the document details