6-Gate Level Minimisation
6-Gate Level Minimisation
LECTURE 7
Gate-level minimisation
2
Recap
• More logic gates
• NAND
• NOR
• XOR
• XNOR
3
Outline
• Karnaugh maps
• Two- and three-variable maps
• Minimisation rules
• Application of Karnaugh maps (e.g. One-bit adder)
• Four and Five-variable Karnaugh maps
4
Karnaugh maps
x 1 xy’ 1 1 0 0
xy 0 0
1 1 0
5
Karnaugh maps
Two- and Three-variable maps
• Two-variable map: y
y
x 0 1
m0 m1 0 x’y’ x’y
m2 m3 x 1 xy’ xy
• Three-variable map:
y
yz
x 00 01 11 10
m0 m1 m3 m2 0 x’y’z’ x’y’z x’yz x’yz’
z
6
Karnaugh maps
• Two-variable map:
B0 1 B0 1
A A
00 1 F=AB +A’B 00 1 F=AB +AB +AB
11 0 11 1
• Three-variable map:
A B C F
BC 0 0 0 0
00 01 11 10 0 0 1 1
A 0 1 0 1
00 1 0 1 0 1 1 0
11 1 1 1 1
1
0
0
0
1
1
1
1 1 0 1
F=AB’C’ +AB C +ABC +ABC + A’B’C + A’BC’ +
1 1 1 1
7
Karnaugh maps
Rules for K-maps
• We can reduce functions by circling 1’s in the K-map
• Each circle represents minterm reduction
• Following circling, we can deduce minimised AND-OR
form.
Rules to consider:
• Every cell containing a 1 must be included at least once.
• The largest possible “power of 2 rectangle” must be
enclosed.
• The 1’s must be enclosed in the smallest possible number
of rectangles.
8
Karnaugh maps
B0 1 B0 1
A A
00 1 00 1 F=AB +AB +AB
F=AB +A’B
11 0 11 1
F=A+B
BC
00 01 11 10
A
00 1 0 1
F=AB’C’ +AB C +ABC +ABC + A’B’C + A’BC’
11 1 1 1
F=A+B C +BC
9
Karnaugh maps
BC
00 01 11 10
A
01 1 0 1
11 0 0 1
F=A’B +C
Application of Karnaugh Maps:10
The One-bit Adder
Cin
A B Cin S Cout
0 0 0 0 0
0 0 1 1 0
A 0 1 0 1 0
Adder S 0 1 1 0 1
B 1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Cout +
BCin
00 01 11 10
A
00 1 0 1
11 0 1 0
BCin
00 01 11 10
A
00 0 1 0
10 1 1 1
A
S
Cin
Cout
Four-variable Karnaugh map
CD
00 01 11 10
AB
00 1 1 0 1
01 1 1 1 1
11 1 1 0 0
10 1 1 0 0
F=C’+A’B+A’D
’
Four-variable Karnaugh map
0000 1000 CD
00 01 11 10
A’B’C’ AB’C’ AB
0001 1001 00 1 1 0 1
01 0 1 0 0
0010 11 0 0 0 0
B’CD’ A’BC’D 0101 10 1 1 0 1
1010
F=B’C’+B’D’+A’C’D
Can we arrive at the same result using Boolean
algebra?
Five-variable Karnaugh map
• Five variables: A, B, C, D, E
• A five-variable map requires 32 squares
• Use 2 four-variable maps for B, C, D, E: one corresponding
to A=0 and one to A=1:
A=0 A=1
D D
DE DE
BC 00 01 11 10 BC 00 01 11 10
00 m0 m1 m3 m2 00 m16 m17 m19 m18
E E
Five-variable Karnaugh map
A=0 A=1
DE DE
00 01 11 10 00 01 11 10
BC BC
00 1 0 0 1 00 0 0 0 0
01 1 0 0 1 01 0 1 1 0
11 0 1 0 0 11 0 1 1 0
10 0 1 0 0 10 0 1 0 0
F=A’B’E’+ACE+A’BD’E+ABD’E =A’B’E’+ACE+BD’E
Private Study
• Karnaugh maps
• Two- and three-variable maps
• Minimisation rules
• Application of Karnaugh maps (e.g. One-bit adder)
• Four-variable Karnaugh map
• Five-variable Karnaugh map
• Typically simplifying a Boolean expression up to 3
variables can be easily done by applying known
identities. From 3 to 6 variables, K-maps are used. More
than 6-variables, simplification can be done using CAD
packages eg VHDL.