Beruflich Dokumente
Kultur Dokumente
Systems
Boolean algebra
Truth tables
Karnaugh maps
Boolean Algebra
In digital systems we deal with the binary number system. This
means that the value of an element can be either 0 or 1.
The elements can also be referred to as false or true for 0 or 1
respectively.
There are three operators in Boolean algebra:
AND
OR
NOT
Boolean Algebra: AND
The AND operator is by a dot between the two elements or
nothing between the two elements at all. It is also know as
the product of elements.
xy or xy
The AND operator requires that all elements have a value 1 (or
true) for the result to be 1 (or true). Thus if we had two
elements x, y, both x AND y need to be 1 for the result to be
one.
x y xy
0 0 0
0 1 0
1 0 0
1 1 1
Boolean Algebra: OR
The OR operator is represented the same as addition in
regular algebra, with a plus sign. It is also known as the sum of
elements.
x+y
The OR operator requires that either of the two elements be 1
for the result to be 1. So if we had two element x, y, then x OR
y has to have a value of 1 for the result to have a value of 1.
x y x+y
0 0 0
0 1 1
1 0 1
1 1 1
Boolean Algebra: NOT
The NOT operator is represented with an apostrophe after the
element. It is also known as the complement of an element.
x
The NOT operator give the opposite of the elements value as
the result. So for an element x with a value of 1, the NOT of x
is equal to 0.
x x
0 1
1 0
Boolean Algebra: Properties
Boolean algebra is governed by several key properties.
Commutative
x+y=y+x xy=yx
Associative
x + (y + z) = (x + y) + z x (y z) = (x y) z
Distributive
x (y + z) = x y + x z x + y z = (x +y)(x + z)
Absorption
x+xy=x x (x + y) = x
Involution
(x) = x
DeMorgan
(x + y) = xy (x y) = x + y
Boolean Algebra: Properties
Using the previous properties and the knowledge of the
different operators, we can find a few more important
properties of Boolean algebra.
x+0=x x1=x
x + x = 1 x x = 0
x+x=x xx=x
x+1=1 x0=0
Boolean Algebra: Simplifying
Using the properties we can simplify Boolean expressions. For
example lets simplify the following expression.
F = xyz + xy z + x y
First we can see the use of the distributive property. We can
apply is to simplify the expression to:
F = xz (y + y) + x y
Next we can apply one of our derived properties. (x + x) = 1.
This gives us a final simplification of:
F = xz + x y
Minterms Maxterms
Term Designation Term Designation
xyz m0 x+y+z M0
xyz m1 x + y + z M1
xy z m2 x + y + z M2
xy z m3 x + y + z M3
x yz m4 x + y + z M4
z yz m5 x + y + z M5
x y z m6 x + y + z M6
xyz m7 x + y + z M7
Minterms and Maxterms
Example
If we look at the simplified version of the previous example we
can expand it to a sum of minterms or a product of maxterm.
F = xz + x y
To have a sum of minterms, we need to make each term have
all three element (x, y and z). We know that,
(xz)(1) = xz
And we know that,
(y + y) = 1
So we can add the y element into that term.
xz = xz(y + y)
Minterms and Maxterms:
Example cont.
We can multiply the term out to get:
xz = xy z + xyz
By using this same method we can expand the second term.
x y = x yz + x yz
So we find that,
F = xz + x y = xy z + xyz + x yz + x yz
We can express this as a sum of minterm designations.
F = m1 + m3 + m4 + m5
Minterms and Maxterms:
Example cont.
Now we will expand our function to a product of maxterms.
F = xz + x y
This is easiest to do by taking the complement of the sum of
minterms.
F = (m1 + m3 + m4 + m5)
F = m1 m3 m4 m5
F = (xyz) (xyz) (x yz) (x yz)
F = (x + y + z)(x + y + z)(x + y + z)(x + y + z)
F = M1 M3 M4 M5
We now have our two expansions of our function. As a sum of
minterms and as a product of maxterms.
Truth Tables
A truth tables is a method of setting up and testing a boolean
expression for every possible input. The truth table is set up
with a column for each different element in the expression
and an additional column for the fuction its self. For example:
F = x + yz
x y z F
Truth Tables cont.
We then want to fill in the columns with our elements x, y and
z to allow for every possible combination of inputs. As you
may notice, each row corresponds to one minterm starting
with m0 and ending with m7.
x y z F
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Truth Tables cont.
Next we input each of these cases into the function and
calculate what the output will be. The output goes under the
functions column.
x y z F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Karnaugh Map
The truth table is great for visualizing for which inputs you get
a 0 or 1, however it may not be easy to use it to simplify a
boolean expression. For that we use the Karnaugh map.
The Karnaugh map or K-map is a table setup in such a way to
make simplifying expressions really easy. It works with
minterms like the truth tables, this makes going from one to
the other fairly simple.
Well start my looking at a two variable map.
Two-Variable K-map
The first K-map shows the layout for an expression with two
elements.
In the second K-map we can see the relation between the
minterms and the elements.
y
x 0 1
m0 m1 0 xy xy
m2 m3 1 x y xy
Once we have the K-map drawn, we can look at our truth table
and in each box we place the output we found corresponding
to each minterm.
Two-Variable Example
Lets look at the the following function.
F = xy + x y + xy
We start by making a truth table.
x y F
0 0 1
0 1 1
1 0 1
1 1 0
1 1 0
Two-Variable Example cont.
In order to use this K-map to reduce our expression we need
to remember one of our properties of boolean algebra:
(y + y) = 1
If we use this with our minterms we see that,
x y + x y = x(y + y) = x or m0 + m1 = x
We can show this in our K-map but highlighting those given
boxes.
y
x 0 1
0 1 1
1 1 0
Two-Variable Example cont.
We can do the same thing with m0 and m2.
y
x 0 1
0 1 1
1 1 0
1 1 1 0 0
1 1 1 0 1
1 1 1 0 1
01 0 0 0 0
11 0 0 1 0
10 1 1 0 1
For this example we have two boxes of four and one left over.
Four-Variable Example
We can highlight it as follows.
yz
wx 00 01 11 10
00 1 1 0 1
01 0 0 0 0
11 0 0 1 0
10 1 1 0 1