Professional Documents
Culture Documents
Contoh-2:
Parking lot controller Elevator controller Prime number indicator Adder, subtractor,
Brute-force approach
Design: given a description or truth table, find the corresponding Boolean expression and digital circuit. Brute-force design methodology:
Row 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
N3 N2 N1 N0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1
F 0 1 1 1 0 1 0 1 0 0 0 1 0 1 0 0
Algebraic simplification
Recall (T8) X Y + X Y = X
Resulting circuit
Note different logic gates may have different # transistors General idea: simplify the Boolean expression using the theorems, especially (T10, T10, T13, T13) Karnaugh-map (K-map)
Graphical representation of the truth table Offers visualization of (T10, T10) Works for functions with less than 6 variables E.g., VHDL, Verilog, ABEL,
Karnaugh-map usage
Plot 1s corresponding to minterms of function. Circle largest possible rectangular sets of 1s.
# of 1s in set must be power of 2 OK to cross edges Variable is 1 include variable Variable is 0 include complement of variable Variable is both 0 and 1 variable not included
Circled sets and corresponding product terms are called `prime implicants Minimum number of gates and gate inputs
Rules of thumb:
Group (prime implicant) as large (many 1s) as possible As few groups as possible Overlaps are OK
The ALARM output is 1 if PANIC is 1, or if ENABLE is 1 and the house is not secure. The house is secure if WINDOW, DOOR, GARAGE are all 1
Allow ds to be included when grouping sets of 1s to make the sets as large as possible. Do not circle any set that only contains ds.
Prime number detection for BCD numbers (takes value between 0-9) minterms 10-15 are treated as dont-cares: F(N3,N2,N1,N0) = S N3,N2,N1,N0 (1,2,3,5,7) + d(10,11,12,13,14,15)
N3 N0
N3
From K-map:
N3 N2
Prime Implicants: N3 N0 N2 N1 N2 N0
N1 N0
00
0
4
01
11
12 8
10
N2 N0
d
5
13
1
7
1
15
d d
14
9 N0
Here not all prime implicants are essential prime implicants that must be included minimum SOP expression:
F = N3 N0 + N2 N1
1 1
6
11
d
10
10
d
N2
d
N2 N1
5-variable K-maps
The K-map for a 5-variable logic function is organized as two 4-variable K-maps:
Can be visualised as being one 4-variable map on top of another 4-variable map
W WX YZ WX W
00 00 01
3 7 6 0 1 4 5
01
11
12 13 15 14
10
8
YZ
00 00
16 17
01
20 21 23 22
11
28 29 31 30
10
24
25 27 26 Z
9 11 10 Z Y
01
19
11
2
11
18
10
X
10
X
V=0
V=1
00 00 01
3 7 6 0 1 4 5
01
11
12 8
10
00 00
16 17
01
20 21 23 22
11
28 29 31 30
10
24 25 27 26
1
1 1 1
X 13 15 14
1 1
1
Z
01
19
1 1
1
Z
11 10
11
2
1
Y
11
18
10
10
X
V=0
V=1
00 00 01
3 7 6 0 1 4 5
01
11
12 8
10
YZ
00 00
16 17
01
20 21 23 22
11
28
10
24 25 27 26
1 1 1
13
15 14
1 1
1
Z
29
31 30
01
19 Y
1 1
1
Z
11 10
11
2
11
18
10
1
X
10
X
V W X
V=0
WZ
V=1
Minimum SOP: F = V W X + W Z
00
2
01
6
11
4
10
0 1
1
0
3
0 0
7
5 Z
(Y + Z) 10
Z
0
00
2
01
6
11
4
Truth Table
Row X Y Z 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 F 0 1 1 0 0 1 1 0
0
1
0
3
7
0
5
0
Y
(Y + Z)
Minimum PoS: F = (Y + Z) (Y + Z)
00
4
01
11
12 8
10
00 01 11
Y 1 5 13
0
9
0
7 15
0
Z 11
0
2 6 14
0
10
10
0
X
00
4
01
11
12 8
10
00 01 11
Y
1 5 13
0 0
7 15
0
9
(W + Z)
(W + X + Z)
0 0
6 14
Z
11
0
2
10
10
(W + X)
Minimum POS: F = (W + X + Z) (W + Z) (W + X)
X X
Transient output
Steady-state output
Transient output: the temporary output due to the gate propagation delay(s)
Gate propagation delay: the time it takes to pull up (or down) the output signals due to the change at the input depends on the transistor level implementation.
Static-0 Hazard
Static-1 Hazard
Static hazards:
Static-0 hazard: The output should be 0 but goes momentary to 1 as a result of an input change possible in AND-OR circuits Static-1 hazard: The output should be 1 but goes momentary to 0 as a result of an input change possible in OR-AND circuits
Dynamic hazards: The output changes more than once as a result of a single input change (impossible in 2-level circuits).
Circuit
X
1 0 1
Timing Diagram
Z
1 0 1 0 1 0 1 0 1 0 D Steady-state output Time D
F
1 0
Z YZ XZ X Z Z YZ F
YZ X XY
K-map
Z
00
0
01
2
3
11
6 7
10
4
5
0
1
1 1
1
Y
00
01
2 3
11
6 7
10
4 5
0
1
1 1
XZ Z
X Z XY
1
YZ
1
Y
XY
YZ
Homework #2
Turn in: (show your steps)
4.13 (f), 4.14 (f) 4.19 (e), 4.20 (e), 4.21 (e) 4.22 (d) 4.45 4.47 (refer to 4.46 for hints) 4.55 (a) (b) (c) 4.65 4.72 (f), 4.73 (f)
Self exercise: (you do not need to turn in these, but think about them!!)