Beruflich Dokumente
Kultur Dokumente
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.
N. B. Dodge 9/15
Very important
statement!!!!
N. B. Dodge 9/15
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.
N. B. Dodge 9/15
The NOT function is called inversion, and the digital circuit which
inverts is an inverter. The electronic circuit symbol for NOT is:
a
4
N. B. Dodge 9/15
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
N. B. Dodge 9/15
Logical AND
N. B. Dodge 9/15
Logical OR
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
N. B. Dodge 9/15
a+b
a
Switches
AND
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.
N. B. Dodge 9/15
NAND
a
b
ab
a
b
9
NOR
ab
a
0
0
1
1
b
0
1
0
1
a NAND b
1
1
1
0
a
b
a
b
a+b
a+b
a
0
0
1
1
b a NOR b
0
1
1
0
0
0
1
0
N. B. Dodge 9/15
N. B. Dodge 9/15
1:
2:
3:
f = (a + b) (c + d )
11
4:
N. B. Dodge 9/15
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
N. B. Dodge 9/15
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.
N. B. Dodge 9/15
AND Level
* Remember, AND and OR symbols look like the times and plus symbols, hence the names SOP and POS.
14
N. B. Dodge 9/15
OR Level
AND Level
15
POS Illustration:
f = (a + b) (c + d )
N. B. Dodge 9/15
Establish
inputs and
outputs
Construct
Truth
Table
Define Boolean
expression in
SOP or POS form
N. B. Dodge 9/15
17
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
*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
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
N. B. Dodge 9/15
N. B. Dodge 9/15
N. B. Dodge 9/15
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
N. B. Dodge 9/15
N. B. Dodge 9/15
N. B. Dodge 9/15
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)
N. B. Dodge 9/15
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
N. B. Dodge 9/15
26
x
0
0
1
1
y
0
1
0
1
x
y
xy
x
y
xy
N. B. Dodge 9/15
x
f
y
=
f xy + x y
27
N. B. Dodge 9/15
N. B. Dodge 9/15
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)
N. B. Dodge 9/15
N. B. Dodge 9/15
a
b
31
b
=
a
= a b
a
b
b
a
a+b
N. B. Dodge 9/15
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
N. B. Dodge 9/15
N. B. Dodge 9/15
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
x y = x + y
y = x + y .)
N. B. Dodge 9/15
N. B. Dodge 9/15
=
f
( (( abc + ab + bc ) a + b ) c ) + abc
f = abc + abc = ( a + a ) bc .
1 , then f = bc is the
Since ( a + a ) =
AND
abc
abc
N. B. Dodge 9/15
Original circuit
a
f
Proper
SOP Form
37
b
c
c
Lecture #4: Boolean Algebra and Combinational Digital Logic
N. B. Dodge 9/15
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
N. B. Dodge 9/15
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
N. B. Dodge 9/15
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
N. B. Dodge 9/15