Boolean Algebra andLogic Gates 1
DIGITAL LOGIC DESIGN
by
Dr. Fenghui Yao
Tennessee State University
Department of Computer Science
Nashville, TN
2.
Boolean Algebra andLogic Gates 2
Definitions
Definitions
Switching network
Switching network
One or more inputs
One or more inputs
One or more outputs
One or more outputs
Two Types
Two Types
Combinational
Combinational
The output depends only on the
The output depends only on the
present values of the inputs
present values of the inputs
Logic gates are used
Logic gates are used
Sequential
Sequential
The output depends on present
The output depends on present
and past input values
and past input values
3.
Boolean Algebra andLogic Gates 3
Boolean Algebra
Boolean Algebra
Boolean Algebra
Boolean Algebra is used to describe the
is used to describe the
relationship between inputs and outputs
relationship between inputs and outputs
Boolean Algebra
Boolean Algebra is the logic
is the logic
mathematics used for understanding of
mathematics used for understanding of
digital systems
digital systems
Network
.
.
.
.
.
.
Inputs Outputs
4.
Boolean Algebra andLogic Gates 4
Basic Operations
Basic Operations
COMPLEMENT (INVERSE)
1
if
0
and
0
if
1
0
1
and
1
0
'
'
'
'
A
A
A
A
0 is low voltage
1 is high voltage
5.
Boolean Algebra andLogic Gates 5
Basic Operations
Basic Operations
AND
F is 1 if and only if
A and B are both 1
6.
Boolean Algebra andLogic Gates 6
Basic Operations
Basic Operations
OR
F is 1 if and only if
A or B (or both) are 1
7.
Boolean Algebra andLogic Gates 7
Basic Theorems
Basic Theorems
Let’s prove each one
8.
Boolean Algebra andLogic Gates 8
Simplification Theorems
Simplification Theorems
Y
X
Y
XY
XY
Y
Y
X
X
Y
X
X
X
XY
X
X
Y
X
Y
X
X
XY
XY
'
'
'
'
6.
)
(
5.
)
(
4.
3.
)
)(
(
2.
1.
Boolean Algebra andLogic Gates 10
Truth Table
Truth Table
It can represent a boolean function
It can represent a boolean function
For possible input combinations it
For possible input combinations it
shows the output value
shows the output value
There are rows (
There are rows (n
n is the number of
is the number of
input variables)
input variables)
It ranges from 0 to
It ranges from 0 to
n
2
1
2
n
11.
Boolean Algebra andLogic Gates 11
Examples
Examples
Show the truth table for
Show the truth table for
YZ
X
F
'
Show the followings by constructing
Show the followings by constructing
truth tables
truth tables
)
)(
(
)
(
Z
X
Y
X
YZ
X
XZ
XY
Z
Y
X
12.
Boolean Algebra andLogic Gates 12
Example
Example
Draw the network diagram for
Draw the network diagram for
YZ
X
F
'
13.
Boolean Algebra andLogic Gates 13
Example
Example
Draw the network diagram for
Draw the network diagram for
'
'
'
'
Y
X
Z
XY
XYZ
F
14.
Boolean Algebra andLogic Gates 14
Operator Precedence
Operator Precedence
Parenthesis
Parenthesis
NOT
NOT
AND
AND
OR
OR
15.
Boolean Algebra andLogic Gates 15
Inversion
Inversion
'
'
'
'
'
'
)
(
)
(
Y
X
XY
Y
X
Y
X
Prove with the
truth tables…
'
'
2
'
1
'
2
1
'
'
2
'
1
'
2
1
...
)
...
(
...
)
...
(
n
n
n
n
X
X
X
X
X
X
X
X
X
X
X
X
The complement of the product is the sum of the
The complement of the product is the sum of the
complements
complements
The complement of the sum is the product of the
The complement of the sum is the product of the
complements
complements
16.
Boolean Algebra andLogic Gates 16
Examples
Examples
Find the complements of
Find the complements of
?
)
)
((
?
]
)
[(
?
]
)
[(
'
'
'
'
'
'
'
'
'
'
'
D
BC
A
E
D
C
AB
C
B
A
17.
Boolean Algebra andLogic Gates 17
Study Problems
Study Problems
1. Draw a network to realize the following by using
1. Draw a network to realize the following by using
only one AND gate and one OR gate
only one AND gate and one OR gate
ABCF
ABCE
ABCD
Y
2. Draw a network to realize the following by using
2. Draw a network to realize the following by using
two OR gates and two AND gates
two OR gates and two AND gates
)
)(
)(
( Z
V
Y
X
V
X
W
V
F
3. Prove the following equations using truth table
3. Prove the following equations using truth table
'
'
'
'
)
)(
(
)
)(
(
AC
AB
C
AB
C
A
XY
W
Z
W
WZ
XY
W
18.
Boolean Algebra andLogic Gates 18
Solution of problem 2
Solution of problem 2
L.H.S.=(V+X+W)(V+X+Y)(V+Z)
L.H.S.=(V+X+W)(V+X+Y)(V+Z)
=[(V+X)+W(V+X)+Y(V+X)+WY](V+Z)
=[(V+X)+W(V+X)+Y(V+X)+WY](V+Z)
=[(V+X)(1+W+Y)+WY](V+Z)
=[(V+X)(1+W+Y)+WY](V+Z)
=(V+X+WY)(V+Z)
=(V+X+WY)(V+Z)
This can be implemented by two OR
This can be implemented by two OR
gates and two AND gate.
gates and two AND gate.
19.
Boolean Algebra andLogic Gates 19
Minterms
Minterms
Consider variables
Consider variables A
A and
and B
B
Assume that they are somehow combined
Assume that they are somehow combined
with AND operator
with AND operator
There are 4 possible combinations
There are 4 possible combinations
Each of those terms is called a minterm
Each of those terms is called a minterm
(standard product)
(standard product)
In general, if there are n variables, there are
In general, if there are n variables, there are
minterms
minterms
'
'
'
'
,
,
, B
A
AB
B
A
AB
n
2
20.
Boolean Algebra andLogic Gates 20
Exercise
Exercise
List the minterms for 3 variables
List the minterms for 3 variables
A
A B
B C
C Minterm
Minterm Designation
Designation
0
0 0
0 0
0 A
A '
' B
B '
' C
C'
'
0
0 0
0 1
1 A
A '
' B
B '
' C
C
0
0 1
1 0
0 A
A '
' B C
B C'
'
0
0 1
1 1
1 A
A '
' B C
B C
1
1 0
0 0
0 A B
A B '
' C
C'
'
1
1 0
0 1
1 A B
A B '
' C
C
1
1 1
1 0
0 A B C
A B C'
'
1
1 1
1 1
1 A B C
A B C
0
m
1
m
2
m
3
m
4
m
5
m
6
m
7
m
21.
Boolean Algebra andLogic Gates 21
Maxterms
Maxterms
Consider variables
Consider variables A
A and
and B
B
Assume that they are somehow combined with
Assume that they are somehow combined with
OR operator
OR operator
There are 4 possible combinations
There are 4 possible combinations
Each of those terms is called a maxterm
Each of those terms is called a maxterm
(standard sums)
(standard sums)
In general, if there are n variables, there are
In general, if there are n variables, there are
maxterms
maxterms
'
'
'
'
,
,
, B
A
B
A
B
A
B
A
n
2
22.
Boolean Algebra andLogic Gates 22
Exercise
Exercise
List the maxterm for 3 variables
List the maxterm for 3 variables
A
A B
B C
C Maxterm
Maxterm Designation
Designation
0
0 0
0 0
0 A+B
A+B+
+C
C
0
0 0
0 1
1 A
A+
+B
B+
+C
C'
'
0
0 1
1 0
0 A
A+
+B
B'
'+C
+C
0
0 1
1 1
1 A+B
A+B'+
'+C
C'
'
1
1 0
0 0
0 A
A'+
'+B+C
B+C
1
1 0
0 1
1 A
A'
'+B+C
+B+C'
'
1
1 1
1 0
0 A
A'+
'+B
B'+
'+C
C
1
1 1
1 1
1 A
A'+
'+B
B'+
'+C
C'
'
0
M
1
M
2
M
3
M
4
M
5
M
6
M
7
M
23.
Boolean Algebra andLogic Gates 23
Example
Example
Express
Express F
F in the sum of minterms and
in the sum of minterms and
product of maxterms formats
product of maxterms formats
3
,
1
,
0
7
,
6
,
5
,
4
,
2
)
(
)
)(
(
2
4
5
6
7
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
m
m
m
m
m
BC
A
C
AB
C
AB
ABC
ABC
BC
A
ABC
C
AB
C
AB
ABC
ABC
BC
A
A
C
C
B
B
A
BC
A
F
'
BC
A
F
24.
Boolean Algebra andLogic Gates 24
Sum-of-Products
Sum-of-Products
All products are the product of single
All products are the product of single
variable only
variable only
EF
CD
B
A
E
D
C
B
A
E
AC
E
CD
AB
)
(
'
'
'
'
'
'
YES
YES
NO
25.
Boolean Algebra andLogic Gates 25
Sum-of-Products
Sum-of-Products
One or more AND gates feeding a
One or more AND gates feeding a
single OR gate at the output
single OR gate at the output
'
'
'
'
E
AC
E
CD
AB
A
'
B
C
'
D
E
A
'
C
'
E
26.
Boolean Algebra andLogic Gates 26
Product-of-Sums
Product-of-Sums
All sums are the sums of single
All sums are the sums of single
variables
variables
EF
D
C
B
A
E
D
C
AB
E
C
A
E
D
C
B
A
)
)(
(
)
(
)
)(
)(
(
'
'
'
'
'
'
YES
YES
NO
27.
Boolean Algebra andLogic Gates 27
Product-of-Sums
Product-of-Sums
One or more OR gates feeding a single
One or more OR gates feeding a single
AND gate at the output
AND gate at the output
)
)(
)(
( '
'
'
'
E
C
A
E
D
C
B
A
A
'
B
C
'
D
E
A
'
C
'
E
28.
Boolean Algebra andLogic Gates 28
Logic Gates
Logic Gates
B
A
F
B
A
F
29.
Boolean Algebra andLogic Gates 29
Exclusive-OR
Exclusive-OR
both
not
but
1
or
1
1
B
A
B
A
'
'
'
'
'
'
'
)
(
)
(
)
(
)
(
1
0
1
0
B
A
AB
B
A
B
A
B
A
AC
AB
C
B
A
C
B
A
C
B
A
C
B
A
A
B
B
A
A
A
A
A
A
A
A
A
30.
Boolean Algebra andLogic Gates 30
Equivalence
Equivalence
Equivalence is the complement of
Equivalence is the complement of
exclusive-OR
exclusive-OR
)
(
)
)(
(
)
(
)
(
'
'
'
'
'
'
'
'
B
A
B
A
AB
B
A
B
A
AB
B
A
B
A
A
B
)
( B
A
)
(
)
( '
'
AC
B
C
B
A
F
Simplify it…
31.
Boolean Algebra andLogic Gates 31
Integrated Circuits
Integrated Circuits
SSI (Small Scale)
SSI (Small Scale)
Less than 10 gates in a package
Less than 10 gates in a package
MSI (Medium Scale)
MSI (Medium Scale)
10-1000 gates in a package
10-1000 gates in a package
LSI (Large Scale)
LSI (Large Scale)
1000s of gates in a single package
1000s of gates in a single package
VLSI (Very Large Scale)
VLSI (Very Large Scale)
Hundred of thousands of gates in a single
Hundred of thousands of gates in a single
package
package
#1 ^*#{}#*^
SHOW merlin, merlin.acs, 83, 80
PLAY Confused
PLAY RestPose
PLAY Explain
SAY Welcome to the second lecture of the CS 311.
SAY Dr. Ali Sekmen will be teaching this class for this semester.
SAY He will have power point presentations for each lecture. Please feel free to ask any questions you have during the lectures.
2) SHOW genie, genie.acs, 10, 30
2) PLAY Greet
2) PLAY RestPose
2) SAY The details of the course are described in the handouts which were distributed at the beginning of the lecture.
SAY This course will provide you with a deep understanding of Java programming language.
SAY You will be developing both Java Applications and Java Applets.
3) SHOW peedy, peedy.acs, 10, 70
3) PLAY Greet
3) PLAY RestPose
3)SAY You will also develop some practical applications in graphics, multimedia, database connectivity, networking, and Internet.
4)SHOW robby, robby.acs, 80, 30
4)PLAY Greet
4) PLAY RestPose
2)SAY The prerequisite for this course is a grade of C or better in CS 212.
2) SAY Those who do not meet the prerequisite should withdraw this course.
4) SAY Java is much easier than C and C++ yet more powerful for Internet based developments.
3)HIDE
4)HIDE
SLIDE 2=MOVE 17,17