Professional Documents
Culture Documents
Teknik Komputer
Universitas Gunadarma
1
Topik 5 – Desain Rangkaian
Kombinasional
Task:
Given a description of problem (logical statement), find the
corresponding digital circuits that produce the output (answer)
given a set of inputs (condition).
Contoh-2:
Parking lot controller
Elevator controller
Prime number indicator
Adder, subtractor, …
Brute-force approach
Row N3 N2 N1 N0 F
0 0 0 0 0 0
Design: given a description or truth 1 0 0 0 1 1
table, find the corresponding 2 0 0 1 0 1
Boolean expression and digital 3 0 0 1 1 1
circuit. 4 0 1 0 0 0
5 0 1 0 1 1
Brute-force design methodology: 6 0 1 1 0 0
Truth table canonical sum 7 0 1 1 1 1
SoP or sum of minterms 8 1 0 0 0 0
AND-OR / NAND-NAND 9 1 0 0 1 0
10 1 0 1 0 0
Example: prime number detector 11 0 0 1 1 1
F = (1,2,3,5,7,11,13) 12 1 1 0 0 0
13 1 1 0 1 1
14 1 1 1 0 0
15 1 1 1 1 0
Minterm list -> canonical sum
Algebraic simplification
Recall (T8) X · Y + X · Y’ = X
Rules of thumb:
Group (prime implicant) as
large (many 1s) as possible
As few groups as possible
Overlaps are OK
4 variable K-map example
Note how it maps to the
rows of the truth table
Prime-number detector revisited
Compare with the previous circuit
When we solved algebraically, we missed one
simplification- the circuit below has three less gate
inputs.
Design example: alarm controller
Problem statement:
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
From K-map: N3
N3’· N0
N3 N2
Prime Implicants: 00 01 11 10 N2 · N0
N1 N0
N3’· N0 N2’· N1 N2 · N0 0 4 12 8
00 d
Distinguished 1-cells:
1 5 13 9
Cell 1 covered by N3’· N0 01 1 1 d
Cell 2 covered by N2’· N1 N0
3 7 15 11
11 1 1 d d
Here not all prime implicants are
essential prime implicants that N1
2 6 14 10
must be included minimum 10 1 d d
SOP expression:
F = N3’ · N0 + N2’ · N1
N2 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 W
WX WX
YZ 00 01 11 10 YZ 00 01 11 10
0 4 12 8 16 20 28 24
00 00
1 5 13 9 17 21 29 25
01 01
Z Z
3 7 15 11 19 23 31 27
11 11
Y Y
2 6 14 10 18 22 30 26
10 10
X X
V=0 V=1
5-variable K-map example
F(V,W,X,Y,Z)
= V,W,X,Y,Z(4,5,6,7,9,11,13,15,25,27,29,31)
W W
WX WX
YZ 00 01 11 10 YZ 00 01 11 10
0 4 12 8 16 20 28 24
00 1 00
1 5 13 9 17 21 29 25
01 1 1 1 01 1 1
Z Z
3 7 15 11 19 23 31 27
11 1 1 1 11 1 1
Y Y
2 6 14 10 18 22 30 26
10 1 10
X X
V=0 V=1
5-variable K-map example – cont.
W W
WX WX
YZ 00 01 11 10 YZ 00 01 11 10
0 4 12 8 16 20 28 24
00 1 00
1 5 13 9 17 21 29 25
01 1 1 1 01 1 1
Z Z
3 7 15 11 19 23 31 27
11 1 1 1 11 1 1
Y Y
2 6 14 10 18 22 30 26
10 1 10
X X
Truth Table X
XY
Row X Y Z F
0 0 0 0 0 Z 00 01 11 10
1 0 0 1 1 0 2 6 4
2 0 1 0 1 0 0 0
3 0 1 1 0 1 3 7 5
4 1 0 0 0 1 0 0 Z
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0 Y
K-map PoS minimization – cont.
X (Y + Z)
XY
Z 00 01 11 10
0 2 6 4
0 0 0
Truth Table
1 3 7 5
Row X Y Z F 1 0 0 Z
0 0 0 0 0
1 0 0 1 1
2 0 1 0 1 Y
3 0 1 1 0 (Y’ + Z’)
4 1 0 0 0
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0 Minimum PoS: F = (Y + Z) · (Y’ + Z’)
K-map PoS minimization – another
example
Using K-map, find a minimal POS expression for
YZ 00 01 11 10
0 4 12 8
00 0 0
1 5 13 9
01 0 0
Z
3 7 15 11
11 0 0
Y
2 6 14 10
10 0 0
X
K-map PoS minimization – another
example
W
WX
00 01 11 10
YZ
0 4 12 8 (W’ + Z)
00 0 0
1 5 13 9
(W + X + Z’)
01 0 0
Z
3 7 15 11
11 0 0
Y
2 6 14 10
10 0 0
(W’ + X’)
X
0 0 0 0 0
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
Y Y·Z
Eliminate static-1 hazard using K-map
Static-1 hazards are found using k-maps by finding adjacent 1 cells
that are covered by different product terms.
To eliminate static-1 hazards, additional product terms (prime
implicants) are needed to cover such cells thus covering the transition
of the variable causing the hazard.
For the previous example the static-1 hazard is eliminated by
including the additional product term X · Y
New F = X · Z’ + Y · Z + X · Y
X
X·Y X X · Z’
Z 00 01 11 10 Z’
Z
0 2 6 4 X·Z’
0 1 1 X·Y F
1 3 7 5
1 1 1 Z
Y Y·Z
Y·Z Y X·Y
Eliminate static-0 hazard using K-map
A static-0 hazard occurs in OR-AND circuits when an input
variable and its complement are connected to two different OR
gates.