k s w time Inputs Outputs

„
ECE 274 - Digital Logic
Digital Design
Lecture 3
Design Example: Seat Belt Indicator
Lecture 3
„
„
„
„
„
Seat Belt Warning Light Circuit
Functional Requirements:
Combination Logic
Boolean Algebra
Truth Tables
Venn Diagrams
Multiple Output Circuits
Illuminate Driver’s Seat Belt Warning
light whenever the driver’s seat belt is not
fastened and the key is in the ignition
Inputs:?
Outputs:?
Equation:?
1
2
Digital Design
Digital Design
Design Example: Seat Belt Indicator: Completed Circuit
Design Example: Seat Belt Indicator: Timing Diagram
Inputs
1
0
1
s 0
k
Outputs
w1
0
3
time
4
Digital Design
Digital Design
Design Example: Seat Belt Indicator
Combinational Logic Design: Seatbelt Warning Circuit with Person Sensor
Seat Belt Warning Light with Person Sensor
Functional Requirements:
Illuminate Driver’s Seat Belt Warning light whenever
the driver’s seat belt is not fastened, the key is in the
ignition, and person is detected in the seat
Inputs:?
Outputs:?
Equation:?
5
6
Digital Design
Digital Design
Combinational Logic Design: Boolean Algebra
Combinational Logic Design: Boolean Algebra
„
Terminology:
„
„
„
„
Variable: represents a quantity (0 or 1); typically inputs
Literal: appearance of a variable (repetition included)
Product Term: product of literals: a’bc, abc’
Sum-of-Products (SOP): ORing of product terms; abc + abc’
„
Note: (a + b)c is not in SOP form
7
8
Digital Design
Digital Design
A few Boolean Properties
„
Commutative
„
Distributive
„
„
„
„
a+b=b+a
a*b=b*a
a * (b + c) = a * b + a * c
a + (b * c) = (a + b) * (a + c)
„
Associative
„
Identity
„
„
„
„
„
A few Boolean Properties
„
„
„
„
(tricky one)
(a + b) + c = a + (b + c)
(a * b) * c = a * (b * c)
„
0+a=a+0=a
1*a=a*1=a
„
(distributive property)
(complement property)
(identity property)
abc + abc’ = ab(c+c’)
ab(c+c’) = ab(1)
ab(1) = ab
Is x + x’z equivalent to x + z?
„
„
Complement
„
Does abc + abc’ = ab?
„
x+x’z = (x+x’) * (x+z)
(x+x’)*(x+z) = (1)*(x+z)
1*(x+z) = x+z
(second distributive property)
(complement property)
(identity property)
a + a’ = 1
a * a’ = 0
9
„
„
„
„
A few Boolean Properties
„
a+1=1
a*0=0
DeMorgan’s Law
„
(a + b)’ = a’ * b’
„
(a * b)’ = a’ + b’
„
a+a=a
a*a=a
„
the complement of a sum equals the product of the
complements.
the complement of a product equals the sum of the
complements
Involution
„
„
Digital Design
A few Boolean Properties
Idempotent
„
„
Digital Design
Null Elements
„
10
(a’)’ = a
Can xx’ + xy(x’+y’) ever evaluate to 1?
Proof of DeMorgan’s Law
11
12
„
Digital Design
Digital Design
Combinational Logic Design: Basic Logic Gates
More Gates
Everyday Boolean Logic:
„
„
NAND !(xy)
I’ll(i) NOT go to lunch if Mary(m) goes OR John(j) goes, AND
Sally(s) does not go.
NOT(I’ll(i) go to lunch if Mary(m) goes OR John(j) goes, AND
Sally(s) does not go.)
x
y
F
!(x+y)
x+ y
XOR
!(x + y)
XNOR
F
y
x
0
0
1
1
Which answer correctly represents the
statement above:
A) j = !(i + m)(!s)
B) i = (m’*j’) + s
C) i = (m + j) * (!s)
NOR
x
y
0
1
0
1
F
1
1
1
0
x
0
0
1
1
1
x
y
F
x
y
x
y
y
0
1
0
1
1
y
0
1
0
1
F
0
1
1
0
x y
0 0
0 1
1 0
1 1
F
1
0
0
1
F
y
x
0
x
0
0
1
1
F
1
0
0
0
0
13
14
Digital Design
Digital Design
NAND and NOR Gates
DeMorgan’s theorem in terms of logic gates.
x1
x2
x1 ⋅ x2
x1
x2
x1
x2
x1 ⋅ x2 ⋅ … ⋅ xn
NAND gates
x1
xn
x1
x2
x1
x1 + x2 + … + xn
NOR gates
x2
(a)
x1
x2
x1 + x2
x1
x2
x2
x1 x2 = x1 + x2
x1
x1
x2
x2
xn
(b)
x1 + x2 = x1 x2
15
16
Digital Design
Digital Design
Combinational Logic Design: Automatic Door Opener
Combinational Logic Design: Automatic Door Opener
Circuit Description:
f = hc’ + h’pc’
Functional Description:
Design an automatic sliding door.
Open the door if the door is set to be manually held open, OR if the
door is not set to be manually open, and a person is detected.
However, in either case, we only open the door if the door is not set
to stay closed.
Inputs:
p: person in front of door, when p=1
h: held open manually, when h=1
c: force door to stay closed, when c=1
Outputs:
f: open door when f=1
f = hc’ + h’pc’
17
18
Digital Design
Digital Design
Combinational Logic Design: Simplified door opener circuit
Automatic Door Opener: Simplification using Boolean Algebra
„
f = c’(h+p)
f = hc’ + h’pc’
„
„
„
f = c’h + c’h’p (by the commutative property)
f = c’(h + h’p) (by the first distributive property)
f = c’((h + h’) * (h + p)) (by the 2nd distributive property)
„
„
„
f = c’ (h + (h’ * p)) Æ ((h + h’) * (h+p))
f = c’((1)*(h + p)) (by the complement property)
f = c’(h + p) (by the identity property)
f = c’(h+p)
19
20
Digital Design
Digital Design
Representations of Boolean Functions: Truth Tables
Combinational Logic Design: Representations of Boolean Functions
Gene Pair
Outcome
M
D
C
blue
blue
blue
blue
brown
brown
brown
blue
brown
brown
brown
brown
Seven representations of the very same function F(a,b): (a) Two English
descriptions, (b) two equations, (c) two circuits, (d) a truth table.
21
22
Digital Design
Digital Design
Representations of Boolean Functions: Truth Tables
Representations of Boolean Functions: Truth Tables
4-input
a b c d
3-input
2-input
Left Side:
All possible
combinations for
input values
Right Side:
Values for outputs
(a)
a
0
0
1
1
b
0
1
0
1
F
a
0
0
0
(b) 0
1
1
1
1
b
0
0
1
1
0
0
1
1
c
0
1
0
1
0
1
0
1
F
(c)
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
F
5+-input
Truth table structures for: (a) a two-input function F(a,b), (b) a three-input
function F(a,b,c), and (c) a four-input function F(a,b,c,d). Defining a specific
function would involve filling in the rightmost column with a 0 or a 1 for each row.
23
24
Digital Design
Digital Design
Representations of Boolean Functions: Truth Tables
Combinational Logic Design
Left Side:
All possible
combinations for
input values
„
„
Right Side:
Values for outputs
Advantages:
„
Only one truth table
„
Intuitive to read
Disadvantages:
„
Size explosion
Possible conversions from one Boolean function representation to another.
25
26
Digital Design
Digital Design
Combinational Logic Design: Venn Diagrams
Combinational Logic Design: Venn Diagrams
x
(a) Constant 1
(b) Constant 0
x
x
y
(e) x ⋅ y
x
y
(f) x + y
x
x
x
x
y
y
z
(c) Variable x
(g) x ⋅ y
(d) x
(h)
x⋅ y+z
27
„
Digital Design
Digital Design
Combinational Logic Design: Verification of the Distributive Property
Combinational Logic Design: Multiple Output Circuits
Distributive
„
28
„
a * (b + c) = a * b + a * c
Differences from above:
„
„
x
y
x
y
x
y
„
z
z
x
y
z
x⋅y
x
Examples
z
x ⋅ ( y + z)
y+z
x
Multiple columns on the left hand side of table
Can reuse common gate groupings for common portions of the
functions
y
z
x⋅z
x
y
z
x⋅ y+ x⋅z
29
30
Digital Design
Digital Design
Combinational Logic Design: Multiple Output Circuits
Combinational Logic Design: Multiple Output Circuits
a
f
b
g
e
c
d
abcdefg =
1111110
0110000
1101101
Seven-segment display with connections of inputs to segments (left),
sample numbers 0, 1 and 2 (center), and a pair of discrete seven
segment displays (right).
4-bit binary number to seven-segment display truth table.
31
„
Digital Design
Digital Design
Combinational Logic Design: Boolean Algebra: Canonical Forms
Combinational Logic Design: Boolean Algebra: Canonical Forms
Sum-of-Minterms
„
„
32
„
Equation in sum-of-product form where every product term is a
Sum-of-Minterms
„
minterm
Minterm: product term whose literals include every variable of
„
the function exactly once, in either true or complemented form
Equation in sum-of-product form where every product term is a
minterm
Minterm: product term whose literals include every variable of
the function exactly once, in either true or complemented form
„
Example
„
Is the equation F(a,b,c) = a’bc + abc’ +
ab + c in sum-of-minterms form?
F(a,b,c) = a’bc + abc’ + ab + c
„
„
„
„
Not in Sum-of-Minterms form
Two minterms: a’bc, abc’
ab, c are minterms
F(a,b,c) = a’bc +abc’ + abc + a’b’c + ab’c
33
34
Digital Design
Digital Design
Combinational Logic Design: Boolean Algebra: Minterms and Maxterms
Combinational Logic Design: Boolean Algebra: Canonical Forms
„
Products-of-Maxterms
„
„
Equation in product-of-sums form where every sum term is a
maxterm
maxterm: sum term whose literals include every variable of the
function exactly once, in either true or complemented form
„
Example
„
35
J(a,b,c) = (a + b + c’)(a’ + b’ +c’)
36
Digital Design
Humor
37