Академический Документы
Профессиональный Документы
Культура Документы
Electronics I
September 2014
Johnny Cornett
Homework
Chapter 3
3.1, 3.2, 3.5, 3.6, 3.8, 3.15, 3.33,
4.31
Due 17 September
ETR 271 Digital Circuits Fall 2014
Objectives
Logic Functions and Circuits
Boolean Algebra
Logic Gates
Analysis Process
Synthesis Process
Binary Switches
Discreet
open
closed
of
on
false
true
1
4
Binary Switches
Light
Switch
Battery
Light
Battery
x1
S
x2
Light
ON
Otherwise, Light is OFF (if either switch is 0)
L(x1,x2) = x1
x2
Power
supply
Light
x2
L(x1,x2) = x1
+ x2
Combination of Connections
Three switches are placed in series and parallel
S
X
Power
supply
S
X
Light
X
2
Inversion/Complement
What
Light
L(x) = x
L(x) = x = !x = ~x = NOT x
ETR 271 Digital Circuits Fall 2014
The Inverter
Output
LOW (0)
HIGH
(1) (1)
(0)
HIGH
LOW
The Inverter
Example
waveforms:
A
X
0
1
1
1
0
01s complement
The AND
A
Gate
B
A
B
&
0
1
0
0
0
1
The AND
A
Gate
B
A
B
&
Example
waveforms:
A
B
X
1
A
X
A
X
The OR Gate
B
B
The OR gate produces a HIGH output if any
input is HIGH; if all inputs are LOW, the output
is LOW. For a 2-input
Inputs gate,
Output the truth table is
0
0
1
0
1
0
1
1
1
A
B
The OR Gate
A
B
Example
waveforms:
A
B
X
A
The NAND Gate
B
A
B
&
0
1
0
1
1
1
1
0
A
The NAND Gate
B
Example
waveforms:
A
A
B
&
B
X
1
A
X
A
X
The NOR Gate
B
B
The NOR gate produces a LOW output if
any input is HIGH; if all inputs are HIGH,
the output is LOW. For a 2-input gate, the
truth table is
Inputs Output
A B
1
0
0
0
0
1
0
1 is shown with a plus sign
The NOR operation
0
(+) between the variables
and an overbar
1
covering them. Thus,
the NOR operation is
written as X = A + 1B.
The NOR
A
Gate
B
A
B
Example
waveforms:
A
B
X
330
X
=1
A
X
A
X
The XOR Gate
B
B
The XOR gate produces a HIGH output only
when both inputs are at opposite logic levels.
The truth table is
Inputs
A
0
0
0
1
Output
X
0
1
1
0
1 is written as X = AB +
The XOR operation
0
AB. Alternatively, it can be written with a
1
circled plus sign between
the variables as
1
X = A + B.
ETR 271 Digital Circuits Fall
2014
The XOR
A
Gate
B
A
B
=1
Example
waveforms:
A
B
X
Complement
What if we have more than one variable?
22
Truth Tables
Create a table to determine what the outcome
is for a variety of input values
1. First columns are input variables (x1, x2, etc.)
2. Next columns are outcomes/outputs
x x
0
0
1
1
1
0
1
0
1
2
x1
x0
2
x1+
x02
0
0
1
1
1
1
AND
OR
23
Truth Tables
Practice
Create truth tables for the following functions:
F(x1, x2) = x1 + x2
G(x1, x2, x3) = (x1 +
x2) x3
H(x, y) = (x y)
J(x, y) = x + y
K(x) = x + 1
ETR 271 Digital Circuits Fall 2014
24
25
26
Quiz
1.The truth table for a 2-input AND gate is
Inputs
a.
0
0
1
1
0
1
0
1
0
1
1
0
Inputs
c.
Output
Inputs
b.
Output
Output
0
0
1
1
0
1
0
1
1
0
0
0
Inputs
Output
0
0
1
1
0
1
0
1
0
0
0
1
0
0
1
1
0
1
0
1
0
1
1
1
d.
27
Quiz
2.The truth table for a 2-input NOR gate is
Inputs
a.
0
0
1
1
0
1
0
1
0
1
1
0
Inputs
c.
Output
Inputs
b.
Output
Output
0
0
1
1
0
1
0
1
1
0
0
0
Inputs
Output
0
0
1
1
0
1
0
1
0
0
0
1
0
0
1
1
0
1
0
1
0
1
1
1
d.
28
Quiz
3.The truth table for a 2-input XOR gate is
Inputs
a.
0
0
1
1
0
1
0
1
0
1
1
0
Inputs
c.
Output
Inputs
b.
Output
Output
0
0
1
1
0
1
0
1
1
0
0
0
Inputs
Output
0
0
1
1
0
1
0
1
0
0
0
1
0
0
1
1
0
1
0
1
0
1
1
1
d.
29
Quiz
6. A logic gate that produces a HIGH output
only when all of its inputs are HIGH is a(n)
a. OR gate
b. AND gate
c. NOR gate
d. NAND gate
30
Quiz
8. A 2-input gate produces the output shown.
(X represents the output.) This is a(n)
a. OR gate
b. AND gate
c. NOR gate
d. NAND gate
A
B
X
ETR 271 Digital Circuits Fall 2014
31
Quiz
9. A 2-input gate produces a HIGH output
only when the inputs agree. This type of gate
is a(n)
a. OR gate
b. AND gate
c. NOR gate
d. XNOR gate
32
Logic Symbols
When drawing a circuit, it is helpful to have
symbols to describe the logical functions (AND,
OR, NOT)
x1
x2
x1x2
AND
gate
x1
x2
x1+x2
OR
gate
NOT
gate
33
34
x2
A
A
B
x1 x2 f(x1,x2)
0 0
1
0 1
1
1 0
0
1 1
1
A
1
1
B
0
0
35
Equivalent Networks
x
1
x
2
0 0 1 1
1 1 0 0
0 1 0 1
0
1
0
1
1
1
0
1
1
1
0
1 1 0 1
g 0
0
0
0
1
37
Boolean Algebra
38
Boolean Addition
In Boolean algebra, a variable is a symbol
used to represent an action, a condition, or
data. A single variable can only have a value
of
1 or
0.
The
complement
represents the inverse of a
variable and is indicated with an overbar.
Thus,
the is
complement
of its
A is
A.
A literal
a variable or
complement.
Addition is equivalent to the OR operation.
The sum term is 1 if one or more if the literals
are 1. The sum term is zero only if each literal
is 0.
Determine the values of A, B, and C that
make the sum term of the expression A +
B
+ Cliteral
= 0? must = 0; therefore A = 1, B
Each
= 0 and C = 1.
Boolean Multiplication
In Boolean algebra, multiplication is
equivalent to the AND operation. The product
of literals forms a product term. The product
term will be 1 only if all of the literals are 1.
What are the values of the A, B and
C if the product term of A.B.C = 1?
Each literal must = 1; therefore A =
1, B = 0 and C = 0.
Commutative Laws
The commutative laws are applied to
addition and multiplication. For addition, the
commutative law states
In terms of the result, the order in
which variables are ORed makes no
difference.
A+B=B
+A
For multiplication, the commutative law
states
In terms of the result, the order in
which variables are ANDed makes no
difference.
AB =
BA
ETR 271 Digital Circuits Fall
2014
Associative Laws
The associative laws are also applied to
addition and multiplication. For addition, the
associative law states
When ORing more than two
variables, the result is the same
regardless of the grouping of the
variables.
A + (B +C) = (A + B) +
C
Distributive Law
The distributive law is the factoring law. A
common variable can be factored from an
expression just as in ordinary algebra. That is
AB + AC =
A(B+ C)
The distributive law can be illustrated with
equivalent circuits:
B
C
B+ C
A(B+ C)
AB
X
A
B
A
C
AC
AB + AC
Boolean Algebra
Axioms (Basic Assumptions)
1a. 0 0 = 0
1b. 1 + 1 = 1
2a. 1 1 = 1
2b. 0 + 0 = 0
3a. 0 1 = 1 0 = 0
3b. 1 + 0 = 0 + 1 = 1
4a. if x = 0, then NOT x = 1
4b. if x = 1, then NOT x = 0
ETR 271 Digital Circuits Fall 2014
44
Boolean Algebra
Single Variable Theorems
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 NOT x = 0
8b. x + NOT x = 1
9. NOT (NOT x) = x
ETR 271 Digital Circuits Fall 2014
45
Boolean Algebra
Multi-Variable Theorems
10a. x y = y x
10b. x + y = y + x
11a. x (y z) = (x y) z
11b. x + (y + z) = (x + y) +
z
12a. x (y + z) = (x y) +
(x z)
12b. x + (y z) = (x + y)
(x + z)
13a. x + (x y) = x
13b. x (x + y) = x
14a. (x y) + (x NOT y) =
x
14b. (x + y) (x + NOT y) =
x
15a. NOT (x y) = NOT x +
NOT y
15b. NOT (x + y) = NOT x
NOT y
16a. x + (NOT x y) = x + y
16b. x (NOT x + y) = x y
Boolean Algebra
Practice
Reduce the following expressions to simplest
form, using Boolean algebra
(x NOT z) + (NOT y NOT z) + (x z) + (NOT y
z)
(NOT x NOT y) + (x y) + (x NOT y)
47
Venn Diagrams
What does the light blue area represent in the
diagrams below?
x
x
x
y
z
48
Terminology
Logical Sum
- another term for OR operations
Logical Product
- another term for AND operations
(x y) + (y z) + (NOT x z) is the sum of three
products (SOP)
(x + y) (y + z) (NOT x + z) is the product of
three sums (POS)
ETR 271 Digital Circuits Fall 2014
49
Precedence/Appearance
Parentheses will always determine precedence (like
arithmetic)
- too many parentheses can cause confusion
Without parentheses, order is: NOT, AND, OR
x y + y z 1st generate products, then
sum of products
Can also simplify appearance, by removing
(if obvious)
x y + y z xy
+ yz
ETR 271 Digital Circuits Fall 2014
50
x2
f(x1, x2)
51
0
1
0
1
f(x1, x2)
1
1
0
1
52
x1
x2
53
x2
54
55
x1 x2
x2
56
0
1
0
1
f(x1, x2)
1
0
1
1
57
0
0
1
1
0
0
1
1
2
0
1
0
1
0
1
0
1
f(x1, x2)
0
1
0
0
1
1
1
0
58
Standard Forms
There are two standard forms in which all
Boolean expressions can be written:
1. Sum of Products (SOP)
2. Product of Sums (POS)
59
60
Product Term
Sum of
61
Minterms (SOP)
More systematic method Minterms
62
Minterm
6
3
64
Sum Term
Product of
65
Maxterms (POS)
Minterms are where f = 1, Maxterms are where f =
0
66
Maxterm
6
7
0
0
1
1
0
0
1
1
2
0
1
0
1
0
1
0
1
68
0
0
1
1
0
0
1
1
2
0
1
0
1
0
1
0
1
69
Canonical Product-of-Sums
AND each minterm with the value of f for that
minterm
x x
0
0
1
1
1
0
1
0
1
2
f(x1,
x2)1
1
0
1
f = m0 0 + m1 0 + m2
1 + m3 0
f = m2 = x1x2
f = f = (x1x2)
ETR 271 Digital Circuits Fall 2014
70
Canonical Product-of-Sums
AND each minterm with the value of f for that
minterm
x x
0
0
1
1
1
0
1
0
1
2
f(x1,
x2)1
1
0
1
f = f = (x1x2)
DeMorgans theorem
f = (x1x2) = x1 + x2
SOP solution
ETR 271 Digital Circuits Fall 2014
- same as
71
x2) = x1x2 +
x2) = x1x2 + x1x2 +
x2) = x2(x1 + x1) + x1 (x2
x2) = x2(1) + x1 (1)
f(x1, x2) = x2 + x1
x1
x2
ETR 271 Digital Circuits Fall 2014
f
72
Canonical Product-of-Sums
AND each minterm with the value of f for that
minterm
x x
f(x1,
x2)1
1
0 20
1
0
1
0 1
1 0
1 1
f = (x1x2) = x1 + x2 - same as
SOP solution
f = (x x ) = m = M
1
73
0
0
1
1
0
0
1
1
2
0
1
0
1
0
1
0
1
74
0
0
1
1
0
0
1
1
2
0
1
0
1
0
1
0
1
75
0
0 20 30
1
0 0 1
0
0 1 0
0
0 1 1
1 0 0
1
1 0 1
1
1 1 0
1
1 1 1
0
f = M0 M2 M3
M7(x + x + x ) (x + x + x ) (x + x + x )
f=
1
2
3
1
2
3
1
2
3
(x1 + x2 + x3)
f = (x1 + x3) (x2 + x3)
1
76
0
0
1
1
0
0
1
1
2
0
1
0
1
0
1
0
1
Duality
78
DeMorgan's Law
Graphical representation of DeMorgan's Law
x
x
y
x
y
(XY)'
X' + Y'
x
x
y
(X+Y)'
x
y
X'Y'
79
80
81
Simplifying Boolean
Expressions
Combine terms
Eliminate redundant or consensus terms
Eliminate redundant literals
Add redundant terms to be combined
with or allow the elimination of other
terms
82
Equivalency of Boolean
Expressions
A Truth table
Boolean algebra theorems to manipulate one
expression until it is identical to the other.
Boolean algebra theorems to reduce both
expressions independently to the same
expression.
83
Reduces cost
Reduces area requirements
Reduces power consumption
84
85
Logic Circuits
86
Incompletely Specified
Functions
87
Incompletely Specified
Functions
88
Incompletely Specified
Functions
A B C
F
The minterm expansion is:
0 0 0
0
F(A,B,C) = m(2,4,7) + d(1,3,6)
0 0 1
X
don't care minterms
0 1 0
1
The maxterm expansion is:
0 1 1
X
F(A,B,C) = M(0,5) . D(1,3,6)
1 0 0
1
don't care maxterms
1 0 1
0
1 1 0
X
1 1 1
1
A don't care can be either a 0 or 1. Select a
value for each don't care that will help simplify the
89
ETR 271 Digital
Circuits Fall 2 014
function.
Incompletely Specified
Functions
A B
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
C
0
1
0
1
0
1
0
1
F
0
X1
1
X2
1
0
X3
1
Assume X1 = 0, X2 = 0, X3 = 0:
F(A,B,C) = A'BC' + AB'C' + ABC
Assume X1 = 1, X2 = 1, X3 = 1:
F(A,B,C) = (A+B+C)(A'+B+C')
F(A,B,C) = AA'+AB+AC'+A'B+
BB+BC'+A'C+BC+CC'
F(A,B,C) = B + AC' + A'C
Assume X1 = 0, X2 = 1, X3 = 1:
F(A,B,C) = B + AC'
90
Conversion of Requirements to
Steps for designing single output combinational circuit
Equations
Define switching function that specifies desired behavior
Example
To start the car you must have the transmission in Neutral or
Park, have your foot on the brake or the parking brake engaged
and turn the key to ignition.
Define F (U,V,W,X,Y,Z)= Start Car
U = Transmission in Neutral
V= Transmission in Park
W= Foot Brake Engaged
X= Parking Brake Engaged
Y= Key Inserted (note the words didnt indicate this, it was assumed )
Z = Ignition Position Selected
91
Conversion of Sentences to
Equations
F (V,W,X,Y,Z) = (U+V) (W+X)YZ
transmission and brake and key
and ignition
(park or neutral) (foot or hand)
Note: Y could be a dont care if you cant put
the switch in the ignition position without a key
being inserted. However dont care positions
can be a problem under some circumstances that
perhaps are not normal (what if the ignition
lock doesnt work properly). You have to be
careful regarding dont care definitions.
Sometimes you need to be on the safe side.
92
Questions?
93
Simplification of Logic
Functions
94
95
Karnaugh Maps
96
Two-Variable K-map
row
B
#
0
A
0
B
0
1
m1
m2
m3
minter
0
m
m
0
m0
1
1
m
97
0
0
1
1
0
1
0
1
F
0
1
1
1
0
0
2
3
algebraic
98
Karnaugh Maps
A B
0
0
1
1
1
1
0
0
0
1
0
1
A
B
0 1
0 1 0
1 1 0
Group minterms
Only include cells where f = 1
Group must be 2n cells (1,2,4,8, etc)
A = 0, B =
0/1
A'
ETR 271 Digital Circuits Fall 2014
F = A'
99
Three-Variable K-map
row
#
0
minter
m
m0
m1
A
0
00
m0
m4
m2
01
m1
m5
m3
11
m4
m3
m7
m5
10
m2
m6
m6
m7
BC
Gray Code
100
Three-variable K-map:
row
Example
A
B
C
F
#
0
0
0
0
1
0
0
1
2
0
1
0
3
0
1
1
4
1
0
0
5
1
0
1
6
1
1
0
7
1
1
1
Minterm expansion:
Maxterm expansion:
0
0
4
0
5
11
13
7
1
2
6
0
1
0
F(A,B,C) = S m(2, 3, 4, 6)
F(A,B,C) = P M(0, 1, 5, 7)
101
Procedure:
102
103
104
Minimization: Example #1
Minimize the following logic function using a
Karnaugh map:
F(A,B,C) = m(2, 6, 7)
Specify the equivalent maxterm expansion.
105
Minimization: Example #2
Minimize the following logic function using a
Karnaugh map:
F(A,B,C) = M(1, 3, 5, 6, 7)
Specify the equivalent minterm expansion.
106
Minimization: Example #3
Use a Karnaugh map to determine the
1. minimum SOP expression
2. minimum POS expression
107
Minimization: Example #4
Use a Karnaugh map to determine the
1. minimum SOP expression
2. minimum POS expression
108
Minimization: Example #5
For the following truth table:
#
109
Example #5
Specify the:
1. minterm expansion
2. maxterm expansion
110
Minimization: Example #6
For the following truth table:
#
111
Example #6
Specify the:
1. minterm expansion
2. maxterm expansion
112
Minimal Forms
113
11
4
Questions?
11
References
The slides included herein some were taken from the materials accompanying Digital
Fundamentals by Thomas Floyd; Fundamentals of Logic Design, 6th Edition, by Roth and Kinney,
and Dr. Craig Lorie Department of Electrical and Computer Engineering at George Mason
University.
116
Canonical Sum-Of-Products
AND each minterm with the value of f for that
minterm
x x
0
0
1
1
1
f(x1,
x2)1
0
1
0
1
2
1
0
1
f = m 0 1 + m 1 1 + m2
0 + mf3
= 1m + m + m
0
117
A
B
C
AB
CD
...
AB+CD++JK
D
J
K
Sumofproducts
JK
Productterm
ABC
X = ABC+ DE
DE
SOP
ABC
X = ABC+ DE
D
E
DE
X = ABC+ DE AOI
DeMorga
X = (ABC)
n
(DE)
X = (A + B + C)(D +POS
E)
Implementing Combinational
Logic
Implementing a SOP
expression is done by
first forming the AND terms; then the terms
are ORd together.
A
B
D
B
D
E
ETR 271 Digital Circuits Fall
2014
X = ABC + ABD +
BDE