Sie sind auf Seite 1von 40

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Boolean Algebra

Boolean Algebra (named for its developer, George Boole), is the algebra of
digital logic circuits that all computers use.
It is a symbolic representation of logic principles that date back to Greek
logic studies (Aristotle, ~384-322 BC).
In the Victorian Age, mathematicians began to apply formal principles to
Aristotelian logic, which led to the field of symbolic logic.
Technically, Boolean Algebra refers to a family of logic systems, but it is
generally used to refer to one system -- and that is how we will use it.
George Boole (1815-1864) was a mathematician and teacher, the selfeducated son of a cobbler, who married Mary Everest (niece of Sir George
Everest of mountain fame).*
Booles thinking was typical of Victorians: All processes (even thinking!)
could be represented by formal rules. His intent was to formalize the rules
of thinking with logic equations a well-meant but totally impossible task.
Scientists soon began to apply switching algebra to logic problems.
* His key work was An Investigation of the Laws of Thought on Which are Founded the Mathematical Theories of Logic and Probabilities.

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Boolean Algebra (2)


Later contributors improved and adapted Booles work, slowly
evolving it towards computer applications, including William S.
Jevons (1869 the logic piano, a rudimentary Boolean algebra
computational device), and Claude Shannon (1930s a great
early data transmission expert, who died in 2001; he invented
digital data transmission [its all bits]).
Despite many contributors Boolean Algebra is mostly unchanged.
Boolean Algebra is 1-0 logic.
0 = off, not present, false, de-asserted.
1 = on, present, true, asserted.

Very important
statement!!!!

All computer circuits solve problems by performing Boolean


transformations on binary (0-1) variables. It could be said that
Boolean algebra is the algebra of binary systems.
2

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Boolean Algebra in the Computer


In a computer, logic levels 1 and 0 correspond to voltages:
Positive logic uses a + voltage (e.g., 5 V) for 1 and 0 V for 0.
Sometimes, negative logic (1 = 0V, 0 = +V [e.g., 5V]) is used.

There are two classes of digital or computer logic:


Combinational logic output depends only on the inputs.
Sequential logic output depends on the inputs, the internal state of the
logic, and possibly a clock or timing mechanism (studied later).

We will only cover circuit behavior in terms the manipulation of 1s


and 0s. You will cover electronics of digital circuits later.
A logic circuit (gate), is an electronic device that performs a Boolean
function* on one or more inputs, and provides at least one output.
There are three basic Boolean functions:

AND OR NOT

* A function is an action that can be performed on a value, state, or number, resulting in a new value, state, or number.

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

Boolean Functions: Logical Negation


NOT is the simplest logical function: 1 input and 1 output.
NOT is defined as follows: The output f of NOT, given an input
a, is the complement or opposite of the input. Or : f = a
Since NOT can have only a 0 or 1 input, the output of NOT is the
reverse, or complement, of the input.
If the input of NOT is 1, the output is 0.
If the input of NOT is 0, the output is 1.

The NOT function is called inversion, and the digital circuit which
inverts is an inverter. The electronic circuit symbol for NOT is:

a
4

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Truth Tables
The input/output relationship is
easy to show for an inverter (see
last slide).
Boolean Function Truth Table
For more complex functions, a
Input x Input y Output f
table of outputs versus inputs is
helpful.
0
0
0
Such a table is called a truth table,
0
1
1
since the table indicates the 1 (or
true) outputs, although the
1
0
1
table normally shows outputs for
1
1
0
all input combinations.
We will use truth tables to
demonstrate many Boolean
functions.
5

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Logical AND

AND Truth Table

AND has two or more inputs.


a b a AND b
The truth table for a two-input AND with
0 0
0
a and b inputs is shown in the chart.
0 1
0
AND is defined as follows: a AND b = 1 if
and only if (iff) a = 1 and b = 1.
1 0
0
Mathematically, we represent a AND b
1 1
1
as a b (an unfortunate choice).
AND may have more than two inputs, i.
a
2-Input AND
ab
e.: a AND b AND c AND d.
b
The electronic circuit symbols for 2- and
a
4-input ANDs are shown at the right.
abcd
b
4-Input AND c
Regardless of the number of inputs, the
d
output of AND is 1 iff all inputs are 1.
Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Logical OR

OR has two or more inputs.


The truth table for two inputs a, b is shown
in the adjacent chart.
OR is defined as follows: a OR b = 1 if
either a or b or both a and b = 1.
Another way to way this is that a OR b = 0
iff a = b = 0.
Mathematically, we represent a OR b as
a + b (another bad choice).
OR may have many inputs, e. g.: a+b+c+d.
The electronic circuit symbols for 2- and 4input ORs are shown at the right.
Regardless of the number of inputs, the
output of OR is 0 iff all inputs are 0.

OR Truth Table
a
0

b
0

a OR b
0

0
1

1
0

1
1

a
b

a+b
2-Input OR

a
b
c
d

a+b+c+d
4-Input OR

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Illustration of AND and OR with Goofy Flashlights


ab
Light Bulb

a+b
a

Switches

AND

The AND goofy flashlight is a

circuit connecting batteries to a


light bulb via series switches, a & b.
The bulb will be lighted only if both
switches are closed.
Thus we say that the AND light

bulb function = a AND b = a b.

Batteries

OR
The OR goofy flashlight connects
batteries to a light bulb via parallel
switches, a & b.
The bulb will be lighted if either
switch is closed.
Thus we say that the OR light
bulb function = a OR b = a + b.

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

NAND and NOR


Both NAND and NOR are composite functions, but we discuss
them here, since they are commercially available.
The NAND function is inverted AND; NOR is inverted OR.
Mathematically, we use a horizontal bar to indicate the inversion,
i.e.: a NAND b is written as a b , and a NOR b is written as a + b
As NAND is the reverse of AND, the NAND output is 1 unless all
inputs are 1. Likewise, NOR outputs 0 unless all inputs are 0.

NAND
a
b

ab

a
b
9

NOR

NAND Truth Table

ab

a
0
0
1
1

b
0
1
0
1

a NAND b
1
1
1
0

a
b
a
b

NOR Truth Table

a+b
a+b

Lecture #4: Boolean Algebra and Combinational Digital Logic

a
0
0
1
1

b a NOR b
0
1
1
0
0
0
1
0

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Creating Boolean Functions


As mentioned a few slides ago, digital circuits solve problems by
performing Boolean transformations on binary numbers.
Any computer function can be created by combinations of Boolean
variables. Boolean functions created in this way are called
combinational logic, and they are time-independent (we will discuss
sequential, or time-dependent, logic in a few lectures).
When a digital system is being designed, an engineer usually starts
with a specification (spec), which describes how the system performs
(when the system inputs are this, the output is that).
We go from spec truth table, from which we can derive a Boolean
expression, from which a circuit can be made.
We will look at the entire process later: Lets now examine the
Boolean function circuit design process.
10

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Circuit Derived from Boolean Expression


Assume we have some Boolean
functions that represent
computer circuits that we want
to design. How do we go from
the Boolean function to the
computer circuit?
Consider these functions:
f = a+b+c
f= a + b
f = (a b) + c

1:

2:

3:

(finally, a more complicated one!):

f = (a + b) (c + d )
11

4:

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Exercise 1
Now lets try a few digital
circuit designs from the
Boolean expressions:
f = abc
f = (a + b) c
f = (a + b) (c d )
f =a + ( b c ) + d

12

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Complex Boolean Functions: Combinational Logic

Any Boolean function f maps a total of n inputs (x1, x2, x3, ...... xn)
into one output (0,1). That is, a Boolean function f of n variables
produces a single output for each unique combination of inputs.
Remember:
There are only two Boolean variables: 0 or 1.
A Boolean function in which the output f depends only on the input
variables is called combinational logic.
No matter how complex, a Boolean function can always be defined by
using a truth table, as we have done previously.

Principle: Any combinational logic function may be represented by


two levels of logic: a level of AND gates followed by an OR gate, or a
level of OR gates followed by an AND gate. Input inversion may also
be required, but this is not considered a third level.
13

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

SOP and POS Boolean Representations


If we have AND functions followed by an OR, then we have a Sum
of Products (SOP) representation, a misnomer from mathematics.*
If we have ORs followed by an AND, we say that we have a
Product of Sums (POS) representation (also misnamed).
A Sum of Products function looks like this: f = ( a b ) + ( c d ) .
The Boolean function f is the OR of two functions, a AND b & c AND d.
It is an SOP since the ANDs come first, and then the OR.
Likewise, g = ( a b ) + ( c d ) is also SOP, even with inverted inputs.

OR Level SOP Illustration:


f = (a b) + (c d )

AND Level
* Remember, AND and OR symbols look like the times and plus symbols, hence the names SOP and POS.

14

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

SOP and POS (Continued)


A Product of Sums looks like this: f = ( a + b ) ( c + d ) .
In this case, f is a Boolean AND of two OR functions, a OR b &
c OR d. It is POS since the ORs come first, and then the AND.
In the same way, g = ( a + b ) ( c + d ) is also POS. It is also 2level, even though there are also two variable inversions.

OR Level
AND Level
15

POS Illustration:

f = (a + b) (c + d )

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Using a Truth Table to Find Boolean Expressions

In digital circuit design, inputs and outputs are normally defined.*


Since computer circuits use only binary numbers, input values will
always be only 0 and 1, and the output will always be 0 and 1.
The engineer designs the stuff in the middle between input and
output by:

Making a truth table to represent the input/output relationship.


Defining a Boolean expression in SOP or POS form that satisfies the
truth table.
Constructing a circuit that represents the stuff in the middle that
performs the Boolean function on the inputs to get the desired output.

Establish
inputs and
outputs

Construct
Truth
Table

Define Boolean
expression in
SOP or POS form

Design digital circuit


based on Boolean
expression

* Once again, we get this output-versus-input information from a product or performance


specification, or a spec.
16

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Examples: Sum-of-Products Form

17

Assume that we have a specification that


gives the outputs of function f for the 8
possible combinations of inputs x, y, z.
We can then build the truth table shown.
Note that the output is true (=1) for
only two combinations of the inputs. If
we make the Boolean expression SOP,
the first level (which has the most terms)
will have only two AND terms.*
We then define the two AND functions
that result in 1s being output from the
function f for each x, y, z combination.
Note that the two AND functions are
unique.

x
0
0
0
0
1
1
1
1

y
0
0
1
1
0
0
1
1

z
0
1
0
1
0
1
0
1

f(x, y, z)
0
0
0
1
0
1
0
0

ANDs

x y z
x y z

For the x, y, z combination (0,1,1),


f will only be 1 for f = x y z .
For the x, y, z combination (1,0,1),
f will be one for f = x y z (only).

*Note that AND produces a single, unique output of 1 for only one combination of its inputs!
Lecture #4: Boolean Algebra and Combinational Digital Logic
N. B. Dodge

9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

Sum-of-Products Boolean Form (2)


Now we wish to complete the
SOP Boolean expression for
the function which will result
in 1s for the two cases shown.
We know that in SOP form the
second level of Boolean
operator will be an OR.
Thus we define f as:

x
0
0
0
0
1
1
1
1

y
0
0
1
1
0
0
1
1

z
0
1
0
1
0
1
0
1

f(x, y, z)
0
0
0
1
0
1
0
0

ANDs

x y z
x y z

f = ( x y z) + ( x y z)

For f = ( x y z ) + ( x y z ) , note
The Boolean expression is fully that f = 1 only for the two cases in the
truth table. Try other combinations
defined.
of x, y, and z to prove this to yourself.
18

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Boolean Notation; Minterms and Maxterms


In SOP notation, which contain AND terms ORed together, the
AND and the parentheses are often omitted for simplicity.
Thus, the SOP expression f = ( a b c ) + ( a c d ) + ( a b d ) + ( b c d )
could also be written as: f = abc + acd + abd + bcd .
The AND symbols are implied in this representation and are still
used when the expression might not be clear if they were left out.
Since SOP is more compact, it is sometimes called the minterm form,
and the AND components minterms. Similarly, POS is often
referred to as the maxterm form, and the ORs maxterms, since POS
terms are more unwieldy: f = ( a + b + c ) ( a + c + d ) ( b + c + d )
Since this is a customary terminology, the names minterm and
maxterm will be used occasionally in future lectures.
19

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Product-of-Sums Boolean Form


A POS representation will contain
ORs
x y z f(x, y, z)
a first level of ORs.
0 0 0
1
In the SOP example, we looked
0 0 1
1
for the 1 outputs in f.
0 1 0
0
x+ y+z
For POS, we look for outputs that
0 1 1
1
are 0.*
1 0 0
1
Here, f is 0 only for two
1 0 1
1
combinations of x, y, and z.
x+ y+z
1 1 0
0
We represent these conditions in
1 1 1
1
OR form.
Each OR will produce a 0 only for A truth table example, with 0s
the exact OR expression shown.
represented by Boolean OR terms.
*OR produces a single, unique output of 0 for only one combination of its inputs, just as AND produces
20

a single unique output of 1 for only one combination of inputs.


Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

POS Boolean Expressions (2)


We now complete the Boolean
POS expression for the truth
table shown.
Since in POS, the second level
of logic will be an AND, we
know that the two OR terms
must be ANDed together:

x
0
0
0
0
1
1
1
1

y
0
0
1
1
0
0
1
1

z
0
1
0
1
0
1
0
1

f(x, y, z)
1
1
0
1
1
1
0
1

ORs
x+ y+z

x+ y+z

f = ( x + y + z ) ( x + y + z ) For f = ( x + y + z ) ( x + y + z ) ,
The Boolean expression is now
fully defined.
21

note that f=0 only for the two cases


in the truth table. Again, try other
combinations of x, y, and z to prove
this to yourself.

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

SOP versus POS Representations (1)


Any Boolean expression can be
a b f SOP POS
represented in SOP or POS form.
a+b
0 0 0
Consider the truth table shown.
If we represent f in SOP form,
0 1 0
a+b
we have =
f ab + ab .
1 0 1 ab
If we represent f in POS form,
1 1 1 ab
we have f = ( a + b ) ( a + b ) .
Either representation is correct. In general, we pick the
representation that is simplest.
The SOP form is used more frequently, simply because the notation
is easier, but the POS form can have an advantage by making the
Boolean function being represented much simpler to express.
22

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

SOP versus POS Representations (2)


In the example at
ORs
ANDs
x
y
z f(x, y, z)
the right (seen
x+ y+z
0 0 0
0
previously), note
0 0 1
0
x+ y+z
how the SOP form
0 1 0
0
x+ y+z
0 1 1
1
of the Boolean
xyz
1 0 0
0
x+ y+z
expression is much
1 0 1
1
x yz
simpler.
x+ y+z
1 1 0
0
We could also make
0
1 1 1
x+ y+z
up a truth table so
that the POS form POS: f = ( x + y + z ) ( x + y + z ) ( x + y + z )
was much simpler
( x + y + z ) ( x + y + z ) ( x + y + z )
to use as the
representation.
SOP:=
f xyz + x yz
23

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

Exercise 2

Lets try our hand at starting with a truth table and developing the
Boolean expression:
x

AND
1
1

SOP
POS

f = x yz + x yz + xyz
24

f =

OR
0

( x + y + z) ( x + y + z)

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Finding the Truth Table, Given SOP Expression


We can also go the other way, Boolean
expression truth table.
Consider the SOP Boolean expression:

f = xyz + xyz + x yz + xyz


The first term will be 1 when x, y, and z
are 1, the second when x = y = 1, and z =
0, the third when x = z = 1, and y = 0,
and the last when y = z = 1, and x = 0.

We insert the 1 outputs in the truth


table at right. By default all the other
values of f must be 0.

25

x
0
0
0
0
1
1
1
1

y
0
0
1
1
0
0
1
1

z
0
1
0
1
0
1
0
1

f(x, y, z) ANDs
0
0
0
xyz
1
0
x yz
1
xyz
1
xyz
1

Why would we want to go from Boolean


expression first to a truth table second?
Maybe we experimented in the lab to
come up with a Boolean circuit to solve a
problem and now we need to try to
simplify it. Simplify it? Well talk about
that in a few slides.

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Step-by-Step Logic Circuit Design


We usually go truth table circuit,
however. Consider this truth table:
Output f will be 1 when x = 0, y = 1.
The Boolean expression for this term is
xy .

Output f is also 1 when x = 1, y = 0.


The Boolean expression for this term is
xy .

The circuit equivalents of these two


AND terms are shown to the right.

26

x
0
0
1
1

y
0
1
0
1

f(x, y,) SOP Terms


0
1
xy
1
xy
0

x
y

xy

x
y

xy

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

Step-by-Step Logic Circuit Design (2)


We now add the OR level to
our SOP representation to get
the circuit which will produce
the correct output for all
possible input combinations of
the two variables x and y.
The resulting Boolean
expressions is:

x
f
y

=
f xy + x y
27

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Another Boolean Function

Suppose a specification has given


us the following truth table:
abc
a b c y
a
0 0 0 0
abc
0 0 1 0
b
0 1 0 0
abc
0 1 1 1
1 0 0 1
c
1 0 1 1
1 1 0 0
The circuit implementation
1 1 1 0
is shown above.
Then y = abc + abc + abc .
Note that this is also in SOP form.
28

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

Exercise 3: Specification Circuit

Now lets try a design going from


spec to circuit. Below are 2
very simple specs. Use each
set to create (1) a truth table, (2)
a Boolean expression, and (3) the
corresponding digital circuit.
1. A function f has inputs a and b.
Its output is true (or 1) only
when a is 1 and b is 0.
2. Function g has inputs x and y.
Its output is 1 only when the
inputs are opposite (i.e., 1-0 or
0-1).

29

f = ab

a b f
0

0 0

1 0

0 1

1 0

=
g ( x y) + ( x y)

x y g
0

g = ( x + y) ( x + y)

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Looking for the Simplest Expression


Since Boolean expressions represent logical circuit functions that
the engineer may want to build, it is always important to get the
simplest Boolean circuit representation (simplest = cheapest).
Since we chose the SOP or POS form of Boolean expression to
reduce the number of terms, one might think that the resulting
circuit would be the simplest possible digital circuit.
Unfortunately, even a SOP or POS Boolean expression may NOT
be in the simplest form!
However, it is possible to reduce a Boolean expression to its
simplest form using the simple identities and relations that we
discussed earlier (in a future lecture, we will study simplification of
a circuit using a graphical technique called the Karnaugh Map).
30

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

Boolean Theorems: Commutativity


Boolean relations follow simple rules. We discuss some
of these rules or principles before developing more
complex functions. The first is commutativity:
The Boolean functions AND and OR are commutative. That
is:
x y = y x, and x + y = y + x
Using logic circuits, we can illustrate this as:

a
b

31

b
=
a

= a b

a
b

b
a

Lecture #4: Boolean Algebra and Combinational Digital Logic

a+b

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

Distributivity
The AND and OR functions are both distributive:
x(y+z) = (xy) + (xz), and
x + (yz) = (x+y) (x+z)
We can illustrate the AND version of this relation as:
x
y
z

x(y+z)

x
y
(xy)+(xz)

x
z
The OR version can be illustrated similarly. If you
dont believe these assertions, make up the two AND
truth tables and prove it to yourself!
32

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Other Fundamental Boolean Theorems


The following Boolean theorems are often useful:
OR Form
AND Form
x+0=x
x1 = x
1
0
x+x =
x x =
x+x=x
xx=x
x+1=1
x0=0
And, finally, we note that:
x=x
33

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

DeMorgans Laws
One other useful relationship in manipulating Boolean expressions is
DeMorgans Law. There are OR and AND versions of the law.
The OR version of DeMorgans law states that the complement of (x
OR y) is equal to x-complement AND y-complement, or:

x + y = x y

(This may also be stated as: x + y = x y .)


Likewise, the AND version states that the complement of (x AND y) is
equal to x-complement OR y-complement, or:

x y = x + y

(This may also be stated as: x


34

y = x + y .)

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Simplifying a Boolean Expression


Consider the following Boolean expression:=
f abc + abc .
Is this the simplest possible POS expression? Clearly, the
expression is in proper SOP form. However, as stated earlier, even
a proper SOP function may not be in the simplest form.
Since Boolean expressions are distributive ([ab+ac]=a[b+c]), we
can express the above as:
=
f ab( c + c ) .
Now, from the Boolean identity list, we know that c + c =
1.
Substituting, f = ab( c + c ) = ab (1) = ab .
Clearly this second Boolean expression, which is equivalent, is
much the simpler and therefore, easier and cheaper to build.
35

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

A More Complicated Example


Assume the following expression:

=
f

( (( abc + ab + bc ) a + b ) c ) + abc

This expression is certainly NOT in


proper SOP or POS form.
However, we can input its values in
the truth table at the right. Using
the truth table, the equivalent SOP
f abc + abc .
expression is=
Using Boolean identity (x + x) = 1,

f = abc + abc = ( a + a ) bc .
1 , then f = bc is the
Since ( a + a ) =

simplified SOP term.


36

Lecture #4: Boolean Algebra and Combinational Digital Logic

AND

abc

abc

N. B. Dodge 9/15

Erik Jonsson School of Engineering and


Computer Science

The University of Texas at Dallas

Implementation of Three Forms


a

Original circuit
a
f

Proper
SOP Form

37

b
c

Simplified SOP Form

c
Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Exercise 4
A Boolean expression f
has two inputs, x and y.
The output is 1 when x
and y are both 1 or when
x = 0 and y = 1.
Construct a truth table.
Develop an SOP
expression.
Simplify if possible.
Draw the circuit.
38

x
0
0
1
1

y
0
1
0
1

f
0
1
0
1

=
f x y + xy

f =y ( x + x )
f =y
y
f

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Summary
Digital circuits are electronic implementations of Boolean expressions.
Computer circuits are all composed of logic gates such as we have
discussed: AND, OR, NOT, NAND, NOR, etc.
Logic circuits whose outputs only depend on their inputs are called
combinational logic.
Combinational logic with more than two levels of logic may always be
simplified into sum of products (SOP) or product of sums (POS) form
using a truth table.
An SOP (or POS) expression may not always be in the simplest
possible form. We can use De Morgans Law or other Boolean
identities to simplify an expression, if simplification is possible.
The actual electronic devices that make up logic circuits will not be
discussed in EE 2310, but will be covered in future courses.
39

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

The University of Texas at Dallas

Erik Jonsson School of Engineering and


Computer Science

Design Problem
You have now seen how to go from a requirement to a truth table to a
Boolean Expression to a circuit (and even how to simplify the circuit).
You now get to do a design. Do a first try by yourself. Then you may
review and complete your design with your EE 2310 lab partner.
Here is the requirement (spec): A circuit has three input variables,
x, y, and z. Its output is 1 for the conditions x, y, z = 0, x, y = 0; z = 1,
and x = 0; y, z = 1. Do the following:
Make a truth table from the requirements.
Devise an SOP Boolean expression from the truth table. Simplify it using
the relationships discussed today, but keep in SOP form. (Do not use a
Karnaugh map!)
In EE 2310 Lab. 1, build your design (see Lab. 1 instructions).
Using all combinations of the 8 input variables, demonstrate with your
partner to the lab TA that your real circuit obeys your truth table.
40

Lecture #4: Boolean Algebra and Combinational Digital Logic

N. B. Dodge 9/15

Das könnte Ihnen auch gefallen