W-06-part2-LogicFuncRepresentation (K-Maps)
W-06-part2-LogicFuncRepresentation (K-Maps)
LOGIC DESIGN
WEEK 6
REPRESENTATION OF A LOGIC FUNCTION
with K-Map
and K-map Reductions
2 ways to write a
Two variable minterms and maxterms boolean expression
SOP From
F= ab’c’ + ab’c = m4 + m5
100 101
= ∑ m (4,5)
POS From
Q= (a+b+c’).(a’+b+c’)
001 101
= M1. M5 = ∏ M (1, 5)
Karnaugh Maps (K-Map)
4
K-Maps
Used to make graphical reduction
N variables 2n cells
K-map for the function with 1 input
5
F = A’
Truth table: K-map:
dec A F
0 0 1
1 1 0
Second order K-map
6
Truth table
Second order K-map...
8
Alternative representation
Do not use this !
A: MsB
B: LsB
Locations of
minterms !
3rd order K-map ...
10
OR
0 1 1 1
1 1 1 1
y
y
w z
x
x
w
z
4th order K-maps...
13
y
y
w z
x
x
w
z
14
a’b’d’
To more reduce:
bc’d Instead of cells 0-2 if we take 0,2,8,10
neighbourship:
a
b’ d’
Without k-map:
F = ∑m(0,2,5,7,8,10,13,15)
= m5 + m7 + m13 +m15 + m0 + m2 + m8 + m10
= A’BC’D + A’BCD + ABC’D + ABCD + A’B’C’D’ + A’B’CD +AB’C’D’ +AB’CD’
= A’BD + ABD + B’D’
F = BD + B’D’
19
Problem
A digital circuit will be controlled with 4 switches.
If any two switches are closed the output of the
circuit will be 1; otherwise output will be 0.
dec A B C D Q
0 0 0 0 0 0
1 0 0 0 1 0
2 0 0 1 0 0
3 0 0 1 1 1 m3
4 0 1 0 0 0
5 0 1 0 1 1 m5
6 0 1 1 0 1 m6 Q= a’b’cd + a’bcd’ +ab’cd’ +ab’c’d + abc’d’ +a’bc’d
7 0 1 1 1 0
8 1 0 0 0 0
9 1 0 0 1 1 m9
10 1 0 1 0 1 m10
11 1 0 1 1 0
12 1 1 0 0 1 m12
13 1 1 0 1 0
14 1 1 1 0 0
15 1 1 1 1 0
Prime implicant (PI)
21
Redundant PI
Prime implicant (PI)
22
Essential PIs
Cells 4,5,12,13 bc’
Optional PIs
Cells 0,4 a’c’d’
Redundant PI
Neighbourship cells 0, 2
F= bc’ +b’cd’ +a’c’d’ +a’cd
already used.
Both of them were taken before
Prime implicant (PI)...
23
F=(a’+b+c).(a’+c’+d’).(b’+c’+d).(b+c+d’)
Prime implicant (PI)...
24
EXP: Q(a,b,c,d)=∑m(0,2,4,6,9,11,12,14)
Reduce the function Q as POS form on K-map.
Exp:
F(x, y, z, t) = (1, 3, 7, 11, 15) + Φ (0, 2, 5)
28
Exp:
F (x,y,z,t) =∑ (1,3,7,11,15) + X(0,2,5)
Make reduction in POS form.
Fpos = ?
Fpos= (x’+z). t
Multiple output minimization
29
Create table:
Multiple output minimization...
33 ?
Step2: find common implicants
for combinations
F1. f2 = ∑ (4,6) F1. f3 = ∑ ( 3,4,5,6)
F2.f3 = ∑ (1,4,6) F1. f2. f3 = ∑ (4,6)
After step 4,
we found that :
Entered Variable Map Reduction
35
MEV method
Simple way of solution if there are more than 4 inputs.
Choose least significant bit as free variable
Write the output of the function again according to
0,1, free variable.
How many free variables must be choosen ?
N: input number (a,b,c..)
n : order of compressed k-map
N –n : number of free variable
Each submap covers 2N-n minterms or maxterms
EXP: F(a,b,c)= ∑ m(2,5,6,7) use MEV method and implement
the circuit. A: with SOP form b: with POS form
36
Dec A B C F Dec A B C F
0 0 0 0 0 0 0 0 0 0 0 In compressed
1 0 0 1 0 1 0 0 1 0
k-map,
2 0 1 0 1 2 0 1 0 1 C’ 2 cells will be
3 0 1 1 0 3 0 1 1 0 represented
4 1 0 0 0 4 1 0 0 0 C with 1 cell
5 1 0 1 1 5 1 0 1 1
6 1 1 0 1 6 1 1 0 1 1
7 1 1 1 1 7 1 1 1 1
37
Solution- step 3:
Dec A B C F F
0 0 0 0
Compressed K-map for F.
0 0
0 0 1 0
1 0 1 0 1 C’
0 1 1 0
2 1 0 0 0 C
1 0 1 1
3 1 1 0 1 1
1 1 1 1
Remember: in SOP
C + C’ = 1 Result: F=AC + BC’
38
1 0 1 0 1 C’
0 1 1 0
2 1 0 0 0 C
1 0 1 1
3 1 1 0 1 1
1 1 1 1
F (a,b,c,d)= ∏ M(0,1,6,8,9,11,14,15)
Reduce the function by using 3rd order K-map.
Solution:
# inputs N = 4
Order n=3
2N-n = 21 =2
MAPKEY
Each 2 cells will be
represented by 1
cell in the
compressed k-map.
40