You are on page 1of 5

Discrete Mathematics 2002 Lecture 32, 10-October-2002

Simplifying Digital Circuits


• For practical reasons, we would like digital
circuits to be as simple as possible
• Now, if 2 Boolean expressions are equal,
their circuits will behave in the same way
• So we use the simplest possible form of a
Boolean expression to design a circuit that
corresponds to the expression
• To do this, use the laws of Boolean algebra
to simplify (if possible) the expression
1

Example of Simplifying a Circuit


• Example: Write down the Boolean expression
for the circuit below, find a simpler equivalent
expression, and draw the corresponding circuit

• Answer: z(xz' + yz), which (by the laws on the


next slide) simplifies to zy 2

Laws of Boolean Algebra


x+y=y+x x×y=y×x (commutative)
x + (y + z) = (x + y) + z
x × (y × z) = (x × y) × z (associative)
x + (y × z) = (x + y) × (x + z)
x × (y + z) = (x × y) + (x × z) (distributive)
x+0=x x×1=x (identity)
x + x' = 1 x × x' = 0 (inverse)
x'' = x (double complement)
x+x=x x×x=x (idempotent)
(x + y)' = x' × y' (x × y)' = x' + y' (de Morgan’s)
x+1=1 x×0=0 (annihilation)
x + (x × y) = x x × (x + y) = x (absorption)
0' = 1 1' = 0 (complement)
3

1
Discrete Mathematics 2002 Lecture 32, 10-October-2002

Simplifying the Drawing of a Circuit


• For more complicated circuits, it is convenient
to allow AND & OR gates to have more than
2 inputs
• e.g. Here is a 3-input OR gate:

• Exercise: Draw the digital circuit corresponding


to the Boolean expression xy' + x' + yz
4

8.4 Disjunctive Normal Form &


Karnaugh Maps
• To date, we’ve simplified expressions by
recognizing which laws can be used to produce a
simpler expression than the one we started with
• However, it’s often unclear which law might be
appropriate to use, or even whether the
expression can be simplified at all
• For these reasons, in this section we’ll take a
more systematic approach to dealing with
Boolean expressions 5

Converting a Table to a Boolean


Expression
• Firstly look at a method to obtain a Boolean
expression for a Boolean function in table form
• Example: Consider the following Boolean
function f(x, y)
x y f (x,y)
0 0 1
0 1 0
1 0 1
1 1 0
6

2
Discrete Mathematics 2002 Lecture 32, 10-October-2002

Minterms
• In the language of logic, f(x, y) is true when
x is F and y is F, or x is T and y is F
• Thus f(x, y) is true when x' is T and y' is T,
or x is T and y' is T
• This leads to the expression f(x, y) = x'y' + xy'
• Each of the terms x'y' & xy' is called a minterm
• A minterm is a product that contains each
variable exactly once, with each variable
appearing either as itself or as its complement
7

Disjunctive Normal Form


• A Boolean function expressed as a sum of distinct
minterms is said to be written in disjunctive
normal form (dnf)
• Apart from insignificant variations such as
reordering the minterms, there is only one way a
Boolean function can be written in dnf
• Note that dnf is not necessarily the simplest way
of writing a function as a Boolean expression
• e.g. In the earlier example, f(x, y) is T whenever y
is F, so a simple expression is f(x, y) = y'
• The advantage of dnf is that it is a standard way
of writing any Boolean function 8

Another Example of dnf


• Example: Find the dnf for the Boolean function
given in the following table
x y z f (x,y,z)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
9

3
Discrete Mathematics 2002 Lecture 32, 10-October-2002

Solution to the Example


• To express f(x, y, z) in dnf, extend the method of
the previous example
• For each row where f(x, y, z) = 1, form the
minterm involving the variables x, y & z – use
the variable itself if the column for the variable
contains a 1; use the complement of the variable
if the column contains a 0
• f(x, y, z) is the sum of the resulting minterms
• Thus, in the example,
f(x, y, z) = x'y'z + x'yz' + xy'z' + xyz
10

Converting an Expression to dnf


• Suppose we have a Boolean function that is given
by an expression that is not in dnf
• How can the expression be converted to dnf?
• The following example illustrates the process
• Example: Suppose f(x, y, z) = (x + y'z)(xy)'. Write
f(x, y, z) in dnf
• Solution: By the 2nd de Morgan's law,
(x + y'z)(xy)' = (x + y'z)(x' + y')
• Use the 2nd distrib. law to obtain a sum of terms:
(x + y'z)(x' + y') = xx' + xy' + x'y'z + y'y'z
11

Example of Converting to dnf (cont)


• Next eliminate repeated occurrences of a
variable in a term, by using xx' = 0 & xx = x:
xx' + xy' + x'y'z + y'y'z = xy' + x'y'z + y'z
• Each term needs to contain all 3 variables – so
use x × 1 = x & x + x' = 1:
xy' + x'y'z + y'z = xy'(z + z') + x'y'z + y'z(x + x')
= xy'z + xy'z' + x'y'z + xy'z + x'y'z
• Finally, any repeated minterms are eliminated
by using x + x = x:
f(x, y, z) = xy'z + xy'z' + x'y'z
12

4
Discrete Mathematics 2002 Lecture 32, 10-October-2002

A Comment on dnf
• Note that in the example, xy'z + xy'z' + x'y'z is
not the simplest way of writing f(x, y, z)
• i.e. Part-way through the working we obtained
the simpler expression xy' + x'y'z + y'z (and there
may be even simpler expressions possible)
• The point of dnf is that it provides a standard
way of writing a Boolean expression, from
which a systematic method for simplifying the
expression can be implemented
• This systematic method, based on the use of
Karnaugh maps, will be studied next lecture
13

You might also like