1
Dr. D. J. Jackson Lecture 1-1Electrical & Computer Engineering
ECE380 Digital Logic
Introduction
Dr. D. J. Jackson Lecture 1-2Electrical & Computer Engineering
Digital hardware
• Logic circuits are used to build computer
hardware as well as other products (digital
hardware)
• Late 1960’s and early 1970’s saw a
revolution in digital capability
– Smaller transistors
– Larger chip size
• More transistors/chip gives greater
functionality, but requires more complexity in
the design process
2
Dr. D. J. Jackson Lecture 1-3Electrical & Computer Engineering
Digital hardware
• Integrated circuits are
fabricated on silicon
wafers
• Wafers are cut &
packaged to form
individual chips
• Chips have from tens to
millions of transistors
Dr. D. J. Jackson Lecture 1-4Electrical & Computer Engineering
How complex is a digital design?
• Complexity can, and generally does, surpass
human capability
– 16 million transistors/cm
2
now
– 100 million transistors/cm
2
in 10 years (?)
• Provides motivation for computer-based
design techniques
• Most engineering work is done with CAD
packages
3
Dr. D. J. Jackson Lecture 1-5Electrical & Computer Engineering
Two design approaches
•Traditional
– Relies on mathematical
models
– Analytical approaches
– Provides insight and
understanding of problem
– Useful for small problems
– Inadequate for large
(real) problems
•CAD
– Software relies on
mathematical model and
analytical approach
– Transparent to user
– Many details are
abstracted
– Useful/required for real
problems
Dr. D. J. Jackson Lecture 1-6Electrical & Computer Engineering
Traditional versus CAD design
• CAD tool usage is essential
• Insight and basic understanding offered by
traditional approach is still important
– Initial conceptualization is still traditional
– Effective use of CAD tools requires some
understanding of what the tools are doing
– Use of design options requires insight
4
Dr. D. J. Jackson Lecture 1-7Electrical & Computer Engineering
Types of chips
•Standard chips
– Contain a small amount of circuitry
(<100 transistors)
– Performs simple functions
– 7400 series devices
• Programmable logic devices (PLD)
– Collection of gates with programmable
interconnections
– Function is configurable by designer/user
– Design with PLD is via a CAD tool
Dr. D. J. Jackson Lecture 1-8Electrical & Computer Engineering
Types of chips
•Custom-designed chips
– Optimized for a specific task – better performance
– Larger amount of logic circuitry
– Cost of production is high
– Large volume required to justify cost
5
Dr. D. J. Jackson Lecture 1-9Electrical & Computer Engineering
A field-programmable gate array
Memory block
Group of 8 logic cells
Interconnection
wires
Dr. D. J. Jackson Lecture 1-10Electrical & Computer Engineering
The development process (1)
Design
Correct?
Required Product
Define
specifications
Initial design
Simulation
Redesign
no
6
Dr. D. J. Jackson Lecture 1-11Electrical & Computer Engineering
The development process (2)
Prototype
implementation
Testing
Make
corrections
Meets
specs?
Minor
errors?
Redesign
Finished
product
no
no
yes
yes
Dr. D. J. Jackson Lecture 1-12Electrical & Computer Engineering
What should you expect to gain
from this course?
• Understanding of concepts, models,
algorithms and processes for digital logic
design
– Relevance of the material to subsequent courses
and to your career
• Problem solving skills
– Formulating and attacking new problems
– Need to struggle with problems – evolve your
problem solving skills
• Communicate solutions in a clear, concise
manner
1
Dr. D. J. Jackson Lecture 2-1Electrical & Computer Engineering
ECE380 Digital Logic
Introduction to Logic Circuits:
Variables, functions, truth tables,
gates and networks
Dr. D. J. Jackson Lecture 2-2Electrical & Computer Engineering
Logic circuits
• Logic circuits perform
operations on digital
signals
– Implemented as
electronic circuits where
signal values are
restricted to a few
discrete values
•Inbinary logic circuits
there are only two
values, 0 and 1
• The general form of a
logic circuit is a
switching network
Switching
Network
X
1
X
2
X
3
X
m
Y
1
Y
2
Y
3
Y
n
discrete values
2
Dr. D. J. Jackson Lecture 2-3Electrical & Computer Engineering
Boolean algebra
• Direct application to switching networks
– Work with 2-state devices Æ 2-valued Boolean
algebra (switching algebra)
– Use a Boolean variable (X, Y, etc.) to represent an
input or output of a switching network
– Variable may take on only two values (0, 1)
–X=0, X=1
– These symbols are not
binary numbers, they
simply represent the 2 states of a Boolean
variable
– They are not
voltage levels, although they
commonly refer to the low or high voltage
input/output of some circuit element
Dr. D. J. Jackson Lecture 2-4Electrical & Computer Engineering
Variables and functions
• The simplest binary element is a switch that
has two states
• If the switch is controlled by x, we say the
switch is open if x =0 and closed if x =1
x 1 = x 0 =
(a) Two states of a switch
S
x
(b) Symbol for a switch
3
Dr. D. J. Jackson Lecture 2-5Electrical & Computer Engineering
Variables and functions
• Assume the switch
controls a lightbulb as
shown
– The output is defined as
the state of the light L
• If the light is on -> L=1
• If the light is off -> L=0
• The state of L, as
function of x is
– L(x)=x
•L(x) is a logic function
• x is an input variable
(a) Simple connection to a battery
S
x
(b) Using a ground connection
as the return path
L
Battery
Light
x
Power
supply
S
L
Dr. D. J. Jackson Lecture 2-6Electrical & Computer Engineering
Variables and functions (AND)
• Consider the possibility of two switches
controlling the state of the light
• Using a series connection, the light will be on
only if both switches are closed
–L(x
1
, x
2
)= x
1
· x
2
– L=1 iff (if and only if) x
1
AND x
2
are 1
The logical AND function (series connection)
S
x
1
L
Power
supply
S
x
2
Light
“·” AND operator
The circuit implements
a logical AND function
x
1
· x
2
=x
1
x
2
4
Dr. D. J. Jackson Lecture 2-7Electrical & Computer Engineering
Variables and functions (OR)
• Using a parallel connection, the light will be
on only if either or both switches are closed
–L(x
1
, x
2
)= x
1
+ x
2
–L=1 if x
1
OR x
2
is 1 (or both)
S
x
1
L
Power
supply
S
x
2
The logical OR function (parallel connection)
Light
“+” OR operator
The circuit implements
a logical OR function
Dr. D. J. Jackson Lecture 2-8Electrical & Computer Engineering
Variables and functions
• Various series-parallel connections would
realize various logic functions
–L(x
1
, x
2
, x
3
)= (x
1
+ x
2
)· x
3
S
x
1
L
Power
supply S
x
2
Light
S
x
3
5
Dr. D. J. Jackson Lecture 2-9Electrical & Computer Engineering
Variables and functions
• What would the following logic function look
like if implemented via switches?
–L(x
1
, x
2
, x
3
, x
4
)= (x
1
· x
2
)+ (x
3
· x
4
)
S
x
1
L
Power
supply S
x
3
Light
S
x
2
S
x
4
Dr. D. J. Jackson Lecture 2-10Electrical & Computer Engineering
Inversion
• Before, actions occur when a switch is closed.
What about the possibility of an action
occurring when a switch is opened?
–L(x)= x
– Where L=1 if x=0 and L=0 if x=1
•L(x) is the inverse (or complement) of x
S
x
L
Power
supply
R
The circuit implements
a logical NOT function
x, x’, NOT x
6
Dr. D. J. Jackson Lecture 2-11Electrical & Computer Engineering
Inversion of a function
• If a function is defined as
– f(x
1
, x
2
)= x
1
+ x
2
• Then the complement of f is
– f(x
1
, x
2
)= x
1
+ x
2
= (x
1
+ x
2
)’
• Similarily, if
– f(x
1
, x
2
)= x
1
· x
2
• Then the complement of f is
– f(x
1
, x
2
)= x
1
· x
2
= (x
1
· x
2
)’
Dr. D. J. Jackson Lecture 2-12Electrical & Computer Engineering
Truth tables
• Tabular listing that fully describes a logic
function
– Output value for all input combinations
(valuations)
111
001
010
000
x
1
· x
2
x
2
x
1
111
101
110
000
x
1
+ x
2
x
2
x
1
01
10
x
1
’x
1
AND
OR
NOT
7
Dr. D. J. Jackson Lecture 2-13Electrical & Computer Engineering
Truth tables
• Truth table for AND and OR functions of three
variables
Dr. D. J. Jackson Lecture 2-14Electrical & Computer Engineering
Truth tables of functions
• If L(x,y,z)=x+yz, then the truth table for L
is:
xyzyzx+yz
00000
00100
01000
01111
10001
10101
11001
11111
+
8
Dr. D. J. Jackson Lecture 2-15Electrical & Computer Engineering
Logic gates and networks
• Each basic logic operation (AND, OR, NOT)
can be implemented resulting in a circuit
element called a logic gate
• A logic gate has one or more inputs and one
output that is a function of its inputs
x
1
x
2
x
n
x
1
x
2
x
1
x
2
⋅
x
1
x
2
…
x
n
⋅ ⋅ ⋅
AND gates
Dr. D. J. Jackson Lecture 2-16Electrical & Computer Engineering
Logic gates and networks
x
1
x
2
x
n
x
1
x
2
…
x
n
+ + +
x
1
x
2
x
1
x
2
+
OR gates
x
x
NOT gate
9
Dr. D. J. Jackson Lecture 2-17Electrical & Computer Engineering
Logic gates and networks
• A larger circuit is implemented by a network
of gates
– Called a logic network or logic circuit
x
1
x
2
x
3
f x
1
x
2
+
( )
x
3
⋅
=
Dr. D. J. Jackson Lecture 2-18Electrical & Computer Engineering
Logic gates and networks
• Draw the truth table and the logic circuit for
the following function
– F(a,b,c) = ac+bc’
abcacbc'ac+bc'
000 0 0 0
001 0 0 0
010 0 1 1
011 0 0 0
100 0 0 0
101 1 0 1
110 0 1 1
111 1 0 1
a
c
b
10
Dr. D. J. Jackson Lecture 2-19Electrical & Computer Engineering
Analysis of a logic network
• To determine the functional behavior of a
logic network, we can apply all possible input
signals to it
x
1
x
2
1 1 0 0
→→→
f
0 0 0 1
→→→
1 1 0 1
→→→
0 0 1 1
→→→
0 1 0 1
→→
→
Network that implements
f x
1
x
1
x
2
⋅
+
=
A
B
Dr. D. J. Jackson Lecture 2-20Electrical & Computer Engineering
Analysis of a logic network
• The function of a logic network can also be
described by a timing diagram (gives
dynamic behavior of the network)
1
0
1
0
1
0
1
0
1
0
x
1
x
2
A
B
f
Time
Timing diagram
1
Dr. D. J. Jackson Lecture 3-1Electrical & Computer Engineering
ECE380 Digital Logic
Introduction to Logic Circuits:
Boolean algebra
Dr. D. J. Jackson Lecture 3-2Electrical & Computer Engineering
Axioms of Boolean algebra
• Boolean algebra: based
on a set of rules derived
from a small number of
basic assumptions
(axioms)
•1a0·0=0
• 1b 1+1=1
•2a1·1=1
• 2b 0+0=0
• 3a 0·1=1·0=0
• 3b 1+0=0+1=1
•4aIf x=0 then x’=1
•4bIf x=1 then x’=0
2
Dr. D. J. Jackson Lecture 3-3Electrical & Computer Engineering
Single-Variable theorems
• From the axioms are derived
some rules for dealing with
single variables
•5a x·0=0
• 5b x+1=1
• 6a x·1=x
• 6b x+0=x
• 7a x·x=x
• 7b x+x=x
• 8a x·x’=0
• 8b x+x’=1
• 9 x’’=x
• Single-variable
theorems can be proven
by perfect induction
• Substitute the values
x=0 and x=1 into the
expressions and verify
using the basic axioms
Dr. D. J. Jackson Lecture 3-4Electrical & Computer Engineering
Duality
• Axioms and single-variable theorems are
expressed in pairs
– Reflects the importance of duality
• Given any logic expression, its dual is formed
by replacing all + with ·, and vice versa and
replacing all 0s with 1s and vice versa
– f(a,b)=a+b dual of f(a,b)=a·b
– f(x)=x+0 dual of f(x)=x·1
• The dual of any true statement is also true
3
Dr. D. J. Jackson Lecture 3-5Electrical & Computer Engineering
Two & three variable properties
• 10a. x·y=y·x Commutative
• 10b. x+y=y+x
• 11a. x·(y·z)=(x·y)·z Associative
• 11b. x+(y+z)=(x+y)+z
• 12a. x·(y+z)=x·y+x·z Distributive
• 12b. x+y·z=(x+y)·(x+z)
• 13a. x+x·y=xAbsorption
• 13b. x·(x+y)=x
Dr. D. J. Jackson Lecture 3-6Electrical & Computer Engineering
Two & three variable properties
• 14a. x·y+x·y’=x Combining
• 14b. (x+y)·(x+y’)=x
• 15a. (x·y)’=x’+y’ DeMorgan’s
• 15b. (x+y)’=x’·y’ Theorem
• 16a. x+x’·y=x+y
• 16b. x·(x’+y)=x·y
4
Dr. D. J. Jackson Lecture 3-7Electrical & Computer Engineering
Induction proof of x+x’·y=x+y
• Use perfect induction to prove x+x’·y=x+y
11011
11001
11110
00000
x+yx+x’yx’yyx
equivalent
Dr. D. J. Jackson Lecture 3-8Electrical & Computer Engineering
Perfect induction example
• Use perfect induction to prove (xy)’=x’+y’
0
1
0
1
y’
0
0
1
1
x’
00111
11001
11010
11000
x’+y’(xy)’xyyx
equivalent
5
Dr. D. J. Jackson Lecture 3-9Electrical & Computer Engineering
Proof (algebraic manipulation)
•Prove
– (X+A)(X’+A)(A+C)(A+D)X = AX
– (X+A)(X’+A)(A+C)(A+D)X
– (X+A)(X’+A)(A+CD)X(using 12b)
– (X+A)(X’+A)(A+CD)X
– (A)(A+CD)X (using 14b)
– (A)(A+CD)X
– AX(using 13b)
Dr. D. J. Jackson Lecture 3-10Electrical & Computer Engineering
Algebraic manipulation
• Algebraic manipulation can be used to
simplify Boolean expressions
– Simpler expression => simpler logic circuit
• Not practical to deal with complex
expressions in this way
• However, the theorems & properties provide
the basis for automating the synthesis of
logic circuits in CAD tools
– To understand the CAD tools the designer should
be aware of the fundamental concepts
6
Dr. D. J. Jackson Lecture 3-11Electrical & Computer Engineering
Venn diagrams
• Venn diagram: graphical illustration of
various operations and relations in an algebra
of sets
•A set s is a collection of elements that are
members of s (for us this would be a
collection of Boolean variables and/or
constants)
• Elements of the set are represented by the
area enclosed by a contour (usually a circle)
Dr. D. J. Jackson Lecture 3-12Electrical & Computer Engineering
Venn diagrams
X’
X X’
(a) Constant 1 (b) Constant 0
(c) Variable X (d) X’
X
7
Dr. D. J. Jackson Lecture 3-13Electrical & Computer Engineering
Venn diagrams
X Y
Z
X
X Y X Y
(e) (f)
(g)
(h)
XY X+Y
XY+Z
XY’
Y
Dr. D. J. Jackson Lecture 3-14Electrical & Computer Engineering
Venn diagrams (x+y)’= x’y’
X Y
X YX
X Y
X Y
X’ Y’
XXX Y
(X+Y)’
X XXX Y
X’Y’
X
DeMorgan’s
Theorem
Equivalent
Venn diagrams
imply equivalent
functions
8
Dr. D. J. Jackson Lecture 3-15Electrical & Computer Engineering
Notation and terminology
• Because of the similarity with arithmetic
addition and multiplication operations, the
OR and AND operations are often called the
logical sum and product operations
• The expression
–ABC+A’BD+ACE’
– Is a sum of three product terms
• The expression
– (A+B+C)(A’+B+D)(A+C+E’)
– Is a product of three sum terms
Dr. D. J. Jackson Lecture 3-16Electrical & Computer Engineering
Precedence of operations
• In the absence of parentheses, operations in a logical
expression are performed in the order
–NOT, AND, OR
• Thus in the expression AB+A’B’, the variables in the second
term are complemented before being ANDed together. That
term is then ORed with the ANDed combination of A and B (the
AB term)
9
Dr. D. J. Jackson Lecture 3-17Electrical & Computer Engineering
Precedence of operations
• Draw the circuit
diagrams for the
following
– f(a,b,c)=(a’+b)c
– f(a,b,c)=a’b+c