quine-mccluskey algorithm gautam singh. outline: step 1 find prime implicants: 1)find all the...

29
Quine-McCluskey Algorithm Gautam Singh

Upload: kristina-arnold

Post on 13-Jan-2016

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

Quine-McCluskey Algorithm

Gautam Singh

Page 2: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

Outline: step 1Find Prime Implicants:

1) Find all the minterms and sort by number of 1 bits (these are implicants)

2) Compare every implicant with n 1-bits to all implicants with n+1 1-bits.

3) Combine implicants that vary by a single bit. Replace the bit with an X.

4) Check off implicants that have been 'used'

5) Cross off duplicate implicants.

6) Repeat steps 2 through 5 until no more minterms can be combined

7) The prime implicants are those that were not checked off.

Page 3: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

Outline: step 2Find Essential Prime Implicants:

Make a prime implicant chart with minterms as columns and prime implicants as rows

Look for columns that are 'covered' by only a single prime implicant. These are called

“Essential Prime Implicants.” Put a check next to them and also check off all the columns

they cover.

Among the remaining columns, select the fewest amount of remaining prime implicants

that cover them.

Page 4: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C Y

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

C +ABC¿

B C+AB ¿A B CA BC+A ¿

A B C+ ¿Y= ¿

¿

1 1 1

1 1 1

BC CBCB

A

A

CB

Page 5: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C Y

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

#1 bits implicants

1 001

1 010

2 011

2 101

2 110

3 111

C +ABC¿

B C+AB ¿A B CA BC+A ¿

A B C+ ¿Y= ¿

¿

1 1 1

1 1 1

BCB C B CB C

A

A

Page 6: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C Y

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

#1 bits implicants

1 001

1 010

2 011

2 101

2 110

3 111

implicants

0X1

X01

01X

X10

X11

1X1

11X

C +ABC¿

B C+AB ¿A B CA BC+A ¿

A B C+ ¿Y= ¿

¿

1 1 1

1 1 1

BCB C B CB C

A

A

Page 7: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C Y

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

#1 bits implicants

1 001

1 010

2 011

2 101

2 110

3 111

implicants

0X1

X01

01X

X10

X11

1X1

11X

implicants

XX1

XX1

X1X

X1X

C +ABC¿

B C+AB ¿A B CA BC+A ¿

A B C+ ¿Y= ¿

¿

1 1 1

1 1 1

BCB C B CB C

A

A

Page 8: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C Y

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

#1 bits implicants

1 001

1 010

2 011

2 101

2 110

3 111

implicants

0X1

X01

01X

X10

X11

1X1

11X

implicants

XX1

XX1

X1X

X1X

C +ABC¿

B C+AB ¿A B CA BC+A ¿

A B C+ ¿Y= ¿

¿

1 1 1

1 1 1

BCB C B CB C

A

A

XX1

X1X

Page 9: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C Y

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

C +ABC¿

B C+AB ¿A B CA BC+A ¿

A B C+ ¿Y= ¿

¿

001 010 011 101 110 111

XX1

X1X

1 1 1

1 1 1

BCB C B CB C

A

A

Page 10: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C Y

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 1

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 1

C +ABC¿

B C+AB ¿A B CA BC+A ¿

A B C+ ¿Y= ¿

¿

001 010 011 101 110 111

XX1

X1X

Y= C + B

1 1 1

1 1 1

BCB C B CB C

A

A

Page 11: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

1 0 0 0 X

1 0 0 1 X

1 0 1 0 0

1 0 1 1 0

1 1 0 0 X

1 1 0 1 X

1 1 1 0 1

1 1 1 1 X

Page 12: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

1 0 0 0 X

1 0 0 1 X

1 0 1 0 0

1 0 1 1 0

1 1 0 0 X

1 1 0 1 X

1 1 1 0 1

1 1 1 1 X

1 bits implicants

1 0010

1 1000

2 0011

2 0110

2 1001

2 1100

3 0111

3 1101

3 1110

4 1111

Page 13: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

1 0 0 0 X

1 0 0 1 X

1 0 1 0 0

1 0 1 1 0

1 1 0 0 X

1 1 0 1 X

1 1 1 0 1

1 1 1 1 X

1 bits implicants

1 0010

1 1000

2 0011

2 0110

2 1001

2 1100

3 0111

3 1101

3 1110

4 1111

001X

0X10

100X

1X00

0X11

011X

X110

1X01

110X

11X0

X111

11X1

111X

Page 14: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

1 0 0 0 X

1 0 0 1 X

1 0 1 0 0

1 0 1 1 0

1 1 0 0 X

1 1 0 1 X

1 1 1 0 1

1 1 1 1 X

1 bits implicants

1 0010

1 1000

2 0011

2 0110

2 1001

2 1100

3 0111

3 1101

3 1110

4 1111

001X

0X10

100X

1X00

0X11

011X

X110

1X01

110X

11X0

X111

11X1

111X

0X1X

0X1X

1X0X

1X0X

X11X

X11X

11XX

11XX

Page 15: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

1 0 0 0 X

1 0 0 1 X

1 0 1 0 0

1 0 1 1 0

1 1 0 0 X

1 1 0 1 X

1 1 1 0 1

1 1 1 1 X

1 bits implicants

1 0010

1 1000

2 0011

2 0110

2 1001

2 1100

3 0111

3 1101

3 1110

4 1111

001X

0X10

100X

1X00

0X11

011X

X110

1X01

110X

11X0

X111

11X1

111X

0X1X

0X1X

1X0X

1X0X

X11X

X11X

11XX

11XX

0X1X

1X0X

X11X

11XX

Page 16: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

1 0 0 0 X

1 0 0 1 X

1 0 1 0 0

1 0 1 1 0

1 1 0 0 X

1 1 0 1 X

1 1 1 0 1

1 1 1 1 X

0010 0011 0110 0111 1110

11XX

X11X

1X0X

0X1X

Page 17: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

1 0 0 0 X

1 0 0 1 X

1 0 1 0 0

1 0 1 1 0

1 1 0 0 X

1 1 0 1 X

1 1 1 0 1

1 1 1 1 X

0010 0011 0110 0111 1110

11XX

X11X

1X0X

0X1X

Page 18: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 1

0 1 0 0 0

0 1 0 1 0

0 1 1 0 1

0 1 1 1 1

1 0 0 0 X

1 0 0 1 X

1 0 1 0 0

1 0 1 1 0

1 1 0 0 X

1 1 0 1 X

1 1 1 0 1

1 1 1 1 X

0010 0011 0110 0111 1110

11XX

X11X

1X0X

0X1X

BCCAY

ABCAY

1 1

1 1

X X X 1

X X

BA

BA

AB

BA

DC DCDC CD

Page 19: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D E Y

0 0 0 0 0 1

0 0 0 0 1 1

0 0 0 1 0 0

0 0 0 1 1 0

0 0 1 0 0 1

0 0 1 0 1 1

0 0 1 1 0 0

0 0 1 1 1 0

0 1 0 0 0 0

0 1 0 0 1 0

0 1 0 1 0 0

0 1 0 1 1 0

0 1 1 0 0 0

0 1 1 0 1 0

0 1 1 1 0 1

0 1 1 1 1 1

1 0 0 0 0 1

1 0 0 0 1 1

1 0 0 1 0 0

1 0 0 1 1 0

1 0 1 0 0 1

1 0 1 0 1 1

1 0 1 1 0 0

1 0 1 1 1 0

1 1 0 0 0 0

1 1 0 0 1 0

1 1 0 1 0 0

1 1 0 1 1 1

1 1 1 0 0 0

1 1 1 0 1 0

1 1 1 1 0 0

1 1 1 1 1 1

Page 20: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D E Y

0 0 0 0 0 1

0 0 0 0 1 1

0 0 0 1 0 0

0 0 0 1 1 0

0 0 1 0 0 1

0 0 1 0 1 1

0 0 1 1 0 0

0 0 1 1 1 0

0 1 0 0 0 0

0 1 0 0 1 0

0 1 0 1 0 0

0 1 0 1 1 0

0 1 1 0 0 0

0 1 1 0 1 0

0 1 1 1 0 1

0 1 1 1 1 1

1 0 0 0 0 1

1 0 0 0 1 1

1 0 0 1 0 0

1 0 0 1 1 0

1 0 1 0 0 1

1 0 1 0 1 1

1 0 1 1 0 0

1 0 1 1 1 0

1 1 0 0 0 0

1 1 0 0 1 0

1 1 0 1 0 0

1 1 0 1 1 1

1 1 1 0 0 0

1 1 1 0 1 0

1 1 1 1 0 0

1 1 1 1 1 1

00000

00001

00100

10000

00101

10001

10100

01110

10101

01111

11011

11111

Page 21: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

00000

00001

00100

10000

00101

10001

10100

01110

10101

01111

11011

11111

A B C D E Y

0 0 0 0 0 1

0 0 0 0 1 1

0 0 0 1 0 0

0 0 0 1 1 0

0 0 1 0 0 1

0 0 1 0 1 1

0 0 1 1 0 0

0 0 1 1 1 0

0 1 0 0 0 0

0 1 0 0 1 0

0 1 0 1 0 0

0 1 0 1 1 0

0 1 1 0 0 0

0 1 1 0 1 0

0 1 1 1 0 1

0 1 1 1 1 1

1 0 0 0 0 1

1 0 0 0 1 1

1 0 0 1 0 0

1 0 0 1 1 0

1 0 1 0 0 1

1 0 1 0 1 1

1 0 1 1 0 0

1 0 1 1 1 0

1 1 0 0 0 0

1 1 0 0 1 0

1 1 0 1 0 0

1 1 0 1 1 1

1 1 1 0 0 0

1 1 1 0 1 0

1 1 1 1 0 0

1 1 1 1 1 1

0000X

00X00

X0000

00X01

X0001

0010X

X0100

1000X

10X00

X0101

10X01

1010X

0111X

X1111

11X11

Page 22: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

00000

00001

00100

10000

00101

10001

10100

01110

10101

01111

11011

11111

A B C D E Y

0 0 0 0 0 1

0 0 0 0 1 1

0 0 0 1 0 0

0 0 0 1 1 0

0 0 1 0 0 1

0 0 1 0 1 1

0 0 1 1 0 0

0 0 1 1 1 0

0 1 0 0 0 0

0 1 0 0 1 0

0 1 0 1 0 0

0 1 0 1 1 0

0 1 1 0 0 0

0 1 1 0 1 0

0 1 1 1 0 1

0 1 1 1 1 1

1 0 0 0 0 1

1 0 0 0 1 1

1 0 0 1 0 0

1 0 0 1 1 0

1 0 1 0 0 1

1 0 1 0 1 1

1 0 1 1 0 0

1 0 1 1 1 0

1 1 0 0 0 0

1 1 0 0 1 0

1 1 0 1 0 0

1 1 0 1 1 1

1 1 1 0 0 0

1 1 1 0 1 0

1 1 1 1 0 0

1 1 1 1 1 1

0000X

00X00

X0000

00X01

X0001

0010X

X0100

1000X

10X00

X0101

10X01

1010X

0111X

X1111

11X11

00X0X

X000X

00X0X

X0X00

X000X

X0X00

X0X01

X0X01

X010X

X010X

10X0X

10X0X

Page 23: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

00000

00001

00100

10000

00101

10001

10100

01110

10101

01111

11011

11111

A B C D E Y

0 0 0 0 0 1

0 0 0 0 1 1

0 0 0 1 0 0

0 0 0 1 1 0

0 0 1 0 0 1

0 0 1 0 1 1

0 0 1 1 0 0

0 0 1 1 1 0

0 1 0 0 0 0

0 1 0 0 1 0

0 1 0 1 0 0

0 1 0 1 1 0

0 1 1 0 0 0

0 1 1 0 1 0

0 1 1 1 0 1

0 1 1 1 1 1

1 0 0 0 0 1

1 0 0 0 1 1

1 0 0 1 0 0

1 0 0 1 1 0

1 0 1 0 0 1

1 0 1 0 1 1

1 0 1 1 0 0

1 0 1 1 1 0

1 1 0 0 0 0

1 1 0 0 1 0

1 1 0 1 0 0

1 1 0 1 1 1

1 1 1 0 0 0

1 1 1 0 1 0

1 1 1 1 0 0

1 1 1 1 1 1

0000X

00X00

X0000

00X01

X0001

0010X

X0100

1000X

10X00

X0101

10X01

1010X

0111X

X1111

11X11

00X0X

X000X

00X0X

X0X00

X000X

X0X00

X0X01

X0X01

X010X

X010X

10X0X

10X0X

00X0X

X000X

X0X00

X0X01

X010X

10X0X

Page 24: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

00000

00001

00100

10000

00101

10001

10100

01110

10101

01111

11011

11111

A B C D E Y

0 0 0 0 0 1

0 0 0 0 1 1

0 0 0 1 0 0

0 0 0 1 1 0

0 0 1 0 0 1

0 0 1 0 1 1

0 0 1 1 0 0

0 0 1 1 1 0

0 1 0 0 0 0

0 1 0 0 1 0

0 1 0 1 0 0

0 1 0 1 1 0

0 1 1 0 0 0

0 1 1 0 1 0

0 1 1 1 0 1

0 1 1 1 1 1

1 0 0 0 0 1

1 0 0 0 1 1

1 0 0 1 0 0

1 0 0 1 1 0

1 0 1 0 0 1

1 0 1 0 1 1

1 0 1 1 0 0

1 0 1 1 1 0

1 1 0 0 0 0

1 1 0 0 1 0

1 1 0 1 0 0

1 1 0 1 1 1

1 1 1 0 0 0

1 1 1 0 1 0

1 1 1 1 0 0

1 1 1 1 1 1

0000X

00X00

X0000

00X01

X0001

0010X

X0100

1000X

10X00

X0101

10X01

1010X

0111X

X1111

11X11

00X0X

X000X

00X0X

X0X00

X000X

X0X00

X0X01

X0X01

X010X

X010X

10X0X

10X0X

00X0X

X000X

X0X00

X0X01

X010X

10X0X

X0X0X

X0X0X

X0X0X

Page 25: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

00000 00001 00100 00101 01110 01111 10000 10001 10100 10101 11011 11111

X0X0X

11X11

X1111

0111X

Page 26: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

00000 00001 00100 00101 01110 01111 10000 10001 10100 10101 11011 11111

X0X0X

11X11

X1111

0111X

Page 27: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

00000 00001 00100 00101 01110 01111 10000 10001 10100 10101 11011 11111

X0X0X

11X11

X1111

0111X

ABDEBCDADBY

Page 28: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 1

0 0 0 1 1

0 0 1 0 0

0 0 1 1 0

0 1 0 0 1

0 1 0 1 1

0 1 1 0 X

0 1 1 1 1

1 0 0 0 0

1 0 0 1 0

1 0 1 0 1

1 0 1 1 0

1 1 0 0 0

1 1 0 1 1

1 1 1 0 1

1 1 1 1 1

Page 29: Quine-McCluskey Algorithm Gautam Singh. Outline: step 1 Find Prime Implicants: 1)Find all the minterms and sort by number of 1 bits (these are implicants)

A B C D Y

0 0 0 0 1

0 0 0 1 1

0 0 1 0 0

0 0 1 1 0

0 1 0 0 1

0 1 0 1 1

0 1 1 0 X

0 1 1 1 1

1 0 0 0 0

1 0 0 1 0

1 0 1 0 1

1 0 1 1 0

1 1 0 0 0

1 1 0 1 1

1 1 1 0 1

1 1 1 1 1