Karnaugh Map: Logic Optimization

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Logic Optimization:

Karnaugh Map
Virendra Singh
Professor
Computer Architecture and Dependable Systems Lab
Department of Electrical Engineering
Indian Institute of Technology Bombay
http://www.ee.iitb.ac.in/~viren/
E-mail: [email protected]
EE-224: Digital Systems
Lecture 18-A: 20 October 2020 CADSL
Minimum Sum of Products (MSOP)
• Identify all prime implicants (PI) by letting
minterms and implicants grow.
• Construct MSOP with PI only :
• Cover all minterms
• Use only essential prime implicants (EPI)
• Use no redundant prime implicant (RPI)
• Use cheaper selective prime implicants (SPI)

20 Oct 2020 EE-224@IITB 2 CADSL


Absorption Theorem
• For two Boolean variables: A, B
• A+AB=A
• Proof:
A B
AB

20 Oct 2020 EE-224@IITB 3 CADSL


Consensus Theorem
• For three Boolean variables: A, B, C
• A B +`A C + B C = A B +`A C
• Proof:
A BC
B
AB

C `AC

20 Oct 2020 EE-224@IITB 4 CADSL


Growing Implicants to PI
• F= AB +`CD +`ABCD initial implicants
= AB +`ABCD + BCD +`CD consensus th.
= AB + BCD +`CD absorption th.
= AB + BCD +`CD + BD consensus th.
= AB +`CD + BD absorption th.
A A A

D D D
C C C

B B B

20 Oct 2020 EE-224@IITB 5 CADSL


Identifying EPI
• Find all prime implicants.
• From prime implicant SOP, remove a PI.
• Apply consensus theorem to the remaining SOP.
• If the removed PI is generated, then it is either an RPI or an
SPI.
• If the removed PI is not generated, then it is an EPI

20 Oct 2020 EE-224@IITB 6 CADSL


Example
• PI SOP: F = A D +`A`C +`CD
• Is AD an EPI?
F – {AD} =`A`C +`CD, no new PI can be generated
Hence, AD is an EPI. Similarly, A`C is an EPI.

A
`A`C

D
C

B AD

20 Oct 2020 EE-224@IITB 7 CADSL


Example (Cont.)
• PI SOP: F = A D +`A`C +`CD
• Is `CD an EPI?
F – {`CD } = A D +`A`C
= A D +`A`C +`C D (Consensus theorem)

Hence`C D is not an EPI A


(it is an RPI)

D
Minimum SOP:
F = A D +`A`C C

B
`CD
20 Oct 2020 EE-224@IITB 8 CADSL
Finding MSOP
1. Start with minterm or cube SOP representation of
Boolean function.
2. Find all prime implicants (PI).
3. Include all EPI’s in MSOP.
4. Find the set of uncovered minterms, {UC}.
5. MSOP is minimum if {UC} is empty. DONE.
6. For a minterm in {UC}, include the largest PI from
remaining PI’s (non-EPI’s) in MSOP.
7. Go to step 4.

20 Oct 2020 EE-224@IITB 9 CADSL


Selection of SPI: Patrick’s Method

1 1 EPI

A 1 1 1

C
SPI

19 Oct 2020 EE-224@IITB 10 CADSL


Example: F=åm(1,3,5,7,8,10,12,13,14)
SPI A
0 4 12 8 MSOP:
1 1 F = `A D + A `D + A B`C
1 5 13 9
1 1 1
D
3 7 15 11
1 1
C
2 6 14 10
1 1

B
19 Oct 2020 EE-224@IITB 11 CADSL
20 Oct 2020 EE-224@IITB 12 CADSL
20 Oct 2020 EE-224@IITB 13 CADSL
Minterms Covered by a Product
• A product from which k variables have been
eliminated, covers 2k minterms.
• Example: For four variables, A, B, C, D
Product AC covers 22 = 4 minterms:
1) A`B C`D A
2) A`B C D
3) A B C`D
D
4) A B C D (4) (2)
C
Obtained by inserting the (3) (1)
eliminated variables in all possible ways. B

20 Oct 2020 EE-224@IITB 14 CADSL


Thank You

20 Oct 2020 EE-224@IITB 15 CADSL

You might also like