Professional Documents
Culture Documents
Logic Design
Review Questions
Programmed Exercise 3.1 to 3.5
What is Consensus Theorem?
Logic Design
NTUEE C.M. Li
Logic Design
NTUEE C.M. Li
Outline
Logic Design
NTUEE C.M. Li
Steps
From word description to circuits
Logic Design
NTUEE C.M. Li
Example
Mary watches TV (F)
If it is Monday (A)
And
She has finished her homework (B)
Logic Design
NTUEE C.M. Li
Designing an Alarm
Your job:
the alarm switch is on (A) and the door is not closed (B)
Or
It is after 6pm (C) and the window is not closed (D)
Logic Design
NTUEE C.M. Li
Answer
Z = AB +CD
Logic Design
NTUEE C.M. Li
Teacher says: you will fail the logic design class (F)
If you dont study hard (S) and pass the exam (P)
Does this mean:
F = SP ?
F = SP ?
F = (SP) ?
Example 2
Teacher says: you will fail the logic design class (F)
if you dont study hard (S) or cheat (C)
Does this mean:
F = S + C ?
F = S + C ?
F= (S+C) ? I do not think this one is a good idea
NTUEE C.M. Li
Logic Design
Moral
Logic Design
NTUEE C.M. Li
10
Near future
Words
(English
Chinese)
Words
(Formal
language)
Hardware description
Language (like Verilog)
IC
Dream
Words
(English
Chinese)
IC
IC
Logic Design
NTUEE C.M. Li
11
Outline
Logic Design
NTUEE C.M. Li
12
13
NTUEE C.M. Li
Logic Design
Threshold Detector
Function description
>2
?
000
001
010
011
100
101
110
111
Fig. 4-1
Logic Design
NTUEE C.M. Li
14
F=ABC+ABC+ABC+ABC+ABC
Simplify
F=ABC+AB+AB=A+BC
Circuit
ABC
000
001
010
011
100
101
110
111
15
NTUEE C.M. Li
Logic Design
F=(A+B+C)(A+B+C)(A+B+C)
Simplify
F=(A+B)(A+B+C)
Verify
F=A+BC
Logic Design
NTUEE C.M. Li
ABC
000
001
010
011
100
101
110
111
16
Solution 3 f in SOP
If you do not like solution 2, you can try this
First write f in SOP form
Logic Design
ABC
000
001
010
011
100
101
110
111
NTUEE C.M. Li
17
Outline
Logic Design
NTUEE C.M. Li
18
Minterm
Definition
Not minterm
AABC, AC
NTUEE C.M. Li
Logic Design
19
Minterm (2)
Each minterm has a value of 1 for exactly one combination of values
E.g. A=0 B=1 C=1 ABC=1
Abbreviated form: mi i is row number\
Table 4-1
Logic Design
Row No. i
ABC
minterm
000
ABC = m0
001
ABC = m1
010
ABC = m2
011
ABC = m3
100
ABC = m4
101
ABC = m5
110
ABC = m6
111
ABC = m7
NTUEE C.M. Li
20
Minterm Expansion
When a function is written as a sum of minterms
F=ABC+ABC+ABC+ABC+ABC
m-notation
F=m3+m4+m5+m6+m7
F= m(3,4,5,6,7)
Row
no.
ABC
minterm
000
m0
001
m1
010
m2
011
m3
100
m4
101
m5
110
m6
111
m7
21
NTUEE C.M. Li
Logic Design
Relationship
SOP includes minterm expansion
SOP
A+BC
Minterm Exp.
ABC+ABC+ABC+ABC+ABC
Logic Design
NTUEE C.M. Li
22
Maxterm
Definition
Not Maxterm
A+A+B+C, A+C
NTUEE C.M. Li
Logic Design
23
Maxterm (2)
Each maxterm has a value of 0 for exactly one combination of values
E.g. A=0 B=1 C=1 A+B+C=0
Abbreviated form: Mi i is row number
Table 4-1
Logic Design
Maxterm
000
A+B+C = M0
001
A+B+C = M1
010
A+B+C = M2
011
A+B+C = M3
100
A+B+C = M4
101
A+B+C = M5
110
A+B+C = M6
111
A+B+C = M7
NTUEE C.M. Li
24
Maxterm Expansion
When a function is written as a product of maxterms
Example
F=(A+B+C)(A+B+C)(A+B+C)
M-notation
F=M0M1M2
F=M(0,1,2)
Row
no.
ABC
maxterm
000
M0
001
M1
010
M2
011
M3
100
M4
101
M5
110
M6
111
M7
Logic Design
NTUEE C.M. Li
25
Question
What is the relationship between POS and maxterm expansion?
Logic Design
NTUEE C.M. Li
26
mi = Mi
Example: m0=ABC=(A+B+C)=M0
Table 4-1
Row No. i ABC
minterm
Maxterm
000
ABC = m0
A+B+C = M0
001
ABC = m1
A+B+C = M1
010
ABC = m2
A+B+C = M2
011
ABC = m3
A+B+C = M3
100
ABC = m4
A+B+C = M4
101
ABC = m5
A+B+C = M5
110
ABC = m6
A+B+C = M6
111
ABC = m7
A+B+C = M7
Logic Design
27
NTUEE C.M. Li
F=m3+m4+m5+m6+m7
F= m(3,4,5,6,7)
Complement of F
Minterm expansion
F = m0+m1+m2
m(0,1,2) (eq. 4-7)
Maxterm expansion
F= (m3+m4+m5+m6+m7)
= m3 m4 m5 m6 m7
= M3M4M5M6M7
Logic Design
Row
no.
ABC
minterm
000
m0
001
m1
010
m2
011
m3
100
m4
101
m5
110
m6
111
m7
NTUEE C.M. Li
28
F=M0M1M2
F= M(0,1,2)
Complement of F
Maxterm expansion
F= M(3,4,5,6,7)
Minterm
F=(M0 M1 M2)
= M0 +M1 + M2
= m0+m1+m2
Logic Design
(eq 4-8)
Row
no.
ABC
maxterm
000
M0
001
M1
010
M2
011
M3
100
M4
101
M5
110
M6
111
M7
NTUEE C.M. Li
29
Logic Design
NTUEE C.M. Li
30
e.g.
Logic Design
NTUEE C.M. Li
31
Outline
Logic Design
NTUEE C.M. Li
32
Question
Q: Given three Boolean variables A B C, how many different Boolean
functions can you produce?
Logic Design
ABC
000
001
010
011
100
101
110
111
33
NTUEE C.M. Li
Answer
Every ? Can be 0 or 1
So totally we have 28 =256 possible ways to fill the truth table
Logic Design
NTUEE C.M. Li
ABC
000
0/1
001
0/1
010
0/1
011
0/1
100
0/1
101
0/1
110
0/1
111
0/1
34
TABLE 4-2
ai can be 1 or 0
Minterm expansion for a general function of 3 variables
eq.( 4-12)
Eq. (4-13)
Logic Design
NTUEE C.M. Li
ABC f
000
a0
001
a1
010
a2
011
a3
100
a4
101
a5
110
a6
111
a7
35
Complement
Complement of maxterm expansion
(4.13) = (4.14)
Note: all the minterms that are NOT present in F are present in F
(4-12) = (4.15)
Note: all the maxterms that are NOT present in F are present in F
Logic Design
NTUEE C.M. Li
36
TABLE 4-3
minterm
F
Maxterm
F
minterm
F
Maxterm
F
minterm
m M
#
mM
Maxterm
Mm
#
Mm
37
NTUEE C.M. Li
Logic Design
TABLE 4-4
minterm
F
F=
m(3,4,5,6,7)
F=
M(0,1,2)
Logic Design
Maxterm
F
minterm
F
Maxterm
F
M(0,1,2)
m(0,1,2)
M(3,4,5,6,7)
m(0,1,2)
M(3,4,5,6,7)
m(3,4,5,6,7)
NTUEE C.M. Li
38
Example
NTUEE C.M. Li
Logic Design
39
Logic Design
NTUEE C.M. Li
40
Outline
NTUEE C.M. Li
Logic Design
41
Circuit Partition
Two subcircuits N1 and N2
Logic Design
NTUEE C.M. Li
42
Example
Logic Design
43
NTUEE C.M. Li
P. 94
Logic Design
NTUEE C.M. Li
44
F= m(0,3,7) + d(1,6)
F= M(2,4,5) D(1,6)
Note Dont Care minterm and maxterm have the same numbers
Logic Design
NTUEE C.M. Li
45
Outline
Logic Design
NTUEE C.M. Li
46
Example 1
Design a simple binary adder that adds two 1-bit binary numbers to give
a 2-bit sum
P 100
this is called a half adder
a
Sum
00
(0+0=0)
01
(0+1=0)
01
(1+0=0)
10
(1+1=2)
X=AB
Y=AB+AB
Logic Design
Example 2
Design a binary adder that adds two 2bit binary numbers to give a 3-bit binary
sum
P 101
Note
Logic Design
47
NTUEE C.M. Li
NTUEE C.M. Li
48
Example 3
P.102
6-3-1-1 error detector
Circuit implementation
Logic Design
NTUEE C.M. Li
Example 4
P.103
Design a circuit that
Q: why X?
Logic Design
NTUEE C.M. Li
49
50
Outline
Logic Design
NTUEE C.M. Li
51
Parallel Adder
Design Goal
Fig. 4-2
Logic Design
NTUEE C.M. Li
52
Fig 4-3
NTUEE C.M. Li
Logic Design
53
Truth Table of FA
Fig 4-4
X
Y
Cin
Logic Design
Cout
Sum
NTUEE C.M. Li
54
FA (contd)
After simplification
Circuit implementation
Logic Design
NTUEE C.M. Li
55
Logic Design
NTUEE C.M. Li
56
V= 1 iff
Adding two positive numbers gives a negative result
Or
Adding two negative numbers gives a positive result
V = A3B3S3 + A3B3S3
Logic Design
NTUEE C.M. Li
57
Fig. 4-3
Logic Design
NTUEE C.M. Li
58
Subtracter
X-Y = D
Method 1: reuse the adder to do subtract
Logic Design
NTUEE C.M. Li
59
Fig. 4-6
Logic Design
NTUEE C.M. Li
60
C5
To C0
Logic Design
NTUEE C.M. Li
61
Parallel Subtracter
Figure 4-7
Parallel subtracter can be decomposed into Full Subtracters (FS)
X-Y = D
B is borrow
Logic Design
NTUEE C.M. Li
62
Truth Table of FS
TABLE 4-6
Exercise
Logic Design
xi
yi
bi
bi+1
Di
NTUEE C.M. Li
63
e.g.
Logic Design
NTUEE C.M. Li
64
Answer
Minterm expansion is canonical
E.g.
Logic Design
NTUEE C.M. Li
65
Prove of Equations
Because the terms in minterm expansion of a function F correspond
one-to-one with the rows of the truth table for which F=1
The minterm expansion of F is unique
Prove the equation by finding the minterm expansion of each
side and show their expansions are the same
Example
P.96
Show that ac+bc+ab=ab+bc+ac
Logic Design
NTUEE C.M. Li
66
Next Time
ch 1 Introduction Number Systems
and Conversion
ch 2 Boolean Algebra
ch 3 Boolean Algebra (contd)
ch 4. Application of Boolean Algebra
ch 5 Karnaugh Maps
ch 7 Multi-Level Gate Circuits;
NAND NOR Gates
ch 8 Combinational Ckt Design
Logic Design
NTUEE C.M. Li
67