Loading in 5 sec....

Two-Level SimplificationPowerPoint Presentation

Two-Level Simplification

- 74 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' Two-Level Simplification' - hayes-levine

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Two-Level Simplification

- All Boolean expressions can be represented in two-level forms
- Sum-of-products
- Product-of-sums

Canonical S.O.P. form

- Canonical forms are very easy to produce
- Just read them off of a truth table
- But, they’re not the most efficient representation

Reduced S.O.P. form

- Reduced two-level forms are more efficient

A

B=1

B=0

A=0

A’B’

A’B

AB

AB’

A=1

Venn DiagramsConsider a Venn Diagram for 2 sets, A and B

A’B’

A’B

AB

AB’

B

F

0

0

0

0

1

1

F(A,B)

1

0

1

B

0

1

1

1

0

A

0

00

01

1

10

11

Karnaugh maps2-variable K-map

1

0

Space for A’B’

1

0

Space for A’B

Space for AB’

Space for AB

CD

C

0

1

00

01

11

10

AB

AB

000

001

0000

0001

0011

0010

00

00

m1

m1

m2

m0

m0

m3

010

011

0100

0101

0111

0110

01

01

m3

m5

m6

m2

m4

m7

B

B

C

110

111

1100

1101

1111

1110

11

11

m7

m13

m14

m6

m12

m15

A

A

100

101

1000

1001

1011

1010

10

10

m5

m9

m10

m4

m8

m11

D

Karnaugh mapsK-maps can represent up to four variables easily

f(A,B,C)

f(A,B,C,D)

3-variable

K-map

4-variable

K-map

Numbering Scheme: 00, 01, 11, 10

Gray Code — only a single bit changes from one number to the next

CD

C

0

1

00

01

11

10

AB

AB

00

00

f(A,B,C)

01

01

B

B

C

11

11

A

A

10

10

D

0

0

0

0

0

0

0

0

0

0

0

Filling in a K-mapF(A,B,C,D) = ABC’D’ + AB’CD’ + ABC’D + AB’CD + A’BCD

F (A,B,C) = A’B’C’ + ABC’ + A’B’C + AB’C

1

1

1

1

1

0

0

1

1

1

0

0

1

4-variable

K-map

3-variable

K-map

0

1

A

0

0

1

1

0

1

B

0

1

A

0

1

1

1

0

0

Finding Combinations with K-mapsWe can combine A’B and AB

F = A’B + AB

= B

We can combine A’B’ and A’B

G = A’B’ + A’B

= A’

With Karnaugh maps, adjacent 1’s mean we can combine them

C

0

1

AB

00

01

B

11

A

10

Adjacencies in the K-mapNeighbors

Wrap from top to bottom

Wrap from left to right

F

C

C

1

1

1

1

C

C

0

0

1

1

AB

AB

1

1

0

0

00

00

0

0

0

0

01

01

B

B

0

0

1

1

11

11

A

A

10

10

3-variable K-map examplesF(C,B,A) = A’BC’ + AB’C+ A’B’

In the K-map, adjacency wraps from left to right

and from top to bottom

F(C,B,A) = A’C’+ B’C

Same function, alternative “circling”

Note: Larger circles are better

C

0

0

C

0

1

AB

1

1

00

1

1

01

B

0

0

11

A

10

3-variable K-map examplesWe can use the combining theorem on larger units as well.

G(A,B,C) = A’BC’ + A’BC + ABC’ + ABC

= A’B(C’ + C) + AB(C’ + C)

= A’B + AB

= B(A’ + A)

= B

- What can we circle?
- Any rectangle that contains all ones
- As long as its size is a power of two
- 1, 2, 4, 8, 16, ...
- No rectangles of 3, 5, 6, ...

Find the smallest number of the largest possible rectangles that cover all the 1’s at least once (overlapping circles are allowed)

00

01

11

10

AB

F

00

1

1

1

1

m1

m2

m0

m3

01

m5

m6

m4

m7

1

1

1

1

B

C

11

m13

m14

m12

m15

A

0

1

0

1

10

m9

m10

m8

m11

1

0

1

1

D

4-variable K-map exampleF(A,B,C,D) = åm(0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 14)

Find the smallest number of the largest possible rectangles that cover all the 1’s

- Start at upper left corner and search for 1’s:
- Circled? – Go to next ‘1’
- Not circled? – Circle largest term that contains this ‘1’ and go to next ‘1’
- Tie? – Skip this square for now and come back to it later...

F(A,B,C,D) =

A’

+ BC’D

+ CD’

+ B’D’

+ B’C

G

0

1

A

C

0

0

0

0

0

1

1

1

1

1

0

0

1

CD

CD

C

0

1

00

00

01

01

11

11

10

10

AB

AB

AB

1

1

1

1

1

0

0

0

0

0

1

0

1

00

00

00

0

0

0

0

0

1

1

1

1

1

01

01

01

B

B

B

1

1

1

1

1

0

0

0

0

0

C

C

11

11

11

Q

A

A

A

10

10

10

P

D

D

P= A Å B Å C Å D

K-maps for XORs and XNORsF = A’B + AB’

= A Å B

G = A’B’C + A’BC’ + ABC’ + AB’C

= A Å B Å C

Q= A Å B Å C Å D

00

01

11

10

AB

F

00

m1

m2

m0

m3

1

1

0

0

01

m5

m6

m4

m7

0

0

0

1

B

F = A’C + A’BD’ + AD

C

11

m13

m14

m12

m15

A

0

0

1

1

10

m9

m10

m8

m11

1

0

1

0

D

Product-of-SumsWe can circle 0’s to find a sum-of-products for the complement

F(A,B,C,D) = Sm(0,1,5,8,10,12,14)

F’ =

A’C

+ A’BD’

+ AD

DeMorgan’s Law

F = (A+C’)(A+B’+D)(A’+D’)

Product-of-Sums!

- Circling 1’s gives S.O.P. for F
- Complementing S.O.P. of F gives P.O.S. for F’

- Circling 0’s gives S.O.P. for F’
- Complementing S.O.P. for F’ gives P.O.S. for F

CD

00

00

01

01

11

11

10

10

AB

AB

F

F

00

00

0

0

1

1

1

1

0

0

m1

m1

m2

m2

m0

m0

m3

m3

01

01

0

0

1

1

1

1

x

x

m5

m5

m6

m6

m4

m4

m7

m7

B

B

C

C

11

11

m13

m13

m14

m14

m12

m12

m15

m15

A

A

x

x

x

x

0

0

0

0

10

10

m9

m9

m10

m10

m8

m8

m11

m11

0

0

1

1

0

0

0

0

D

D

K-maps and Don’t CaresInvalid Inputs (Don’t Cares) can be treated as 1's or 0's if it is advantageous to do so

F(A,B,C,D) = Sm(1,3,5,7,9) + Sd(6,12,13)

F = assuming x’s are zero

A’D

+ B’C’D

Tie! - Skip and come back

F = using don’t cares

A’D

+C’D

By treating this X as a "1", a largerrectangle can be formed

D

F

F

F

A

B

1

2

3

AB = CD

A

0

0

0

0

0

F1

N

B

1

1

AB < CD

0

1

F2

1

1

0

AB > CD

C

1

F3

1

1

N

2

D

0

0

0

0

1

=, >, <

0

0

1

1

1

0

1

0

1

0

0

1

1

0

0

0

0

0

1

0

0

0

0

0

1

0

0

1

1

0

1

1

0

1

1

0

0

0

0

0

1

1

0

0

0

0

1

0

0

1

1

0

0

0

1

1

1

1

0

0

0

0

1

0

1

0

1

1

0

Example: 2-bit ComparatorWill need a 4-variable K-map for each of the 3 output functions

DC and BA are two-bitbinary numbers

F2

F1

F3

CD

CD

CD

00

00

00

01

01

01

11

11

11

10

10

10

AB

AB

AB

0

0

0

1

0

0

0

0

0

1

1

1

00

00

00

m1

m1

m1

m2

m2

m2

m0

m0

m0

m3

m3

m3

0

0

0

1

1

0

0

0

0

0

1

1

01

01

01

m5

m5

m5

m6

m6

m6

m4

m4

m4

m7

m7

m7

B

B

B

0

0

1

0

1

1

0

1

0

0

0

0

11

11

11

A

A

A

m13

m13

m13

m14

m14

m14

m12

m12

m12

m15

m15

m15

0

0

0

1

1

1

0

0

0

0

1

0

C

C

C

10

10

10

m9

m9

m9

m10

m10

m10

m8

m8

m8

m11

m11

m11

D

D

D

K-maps for 2-bit comparatorF1 = AB==CD

F2 = AB<CD

F3 = AB>CD

F1 =

F2 =

A’B’C’D’

+ A’BC’D

+ ABCD

+ AB’CD’

A’B’D

+ A’C

+B’CD

-OR-

F3 =

BC’D

+AC’

+ABD’

F1’ =

B’D

+A’C

+BD’

+AC’

F1 = (B+D’)(A+C’)(B’+D)(A’+C)

N1

A B C D W X Y Z

0 0 0 0 1 0 0 1

0 0 0 1 0 0 0 0

0 0 1 0 0 0 0 1

0 0 1 1 0 0 1 0

0 1 0 0 0 0 1 1

0 1 0 1 0 1 0 0

0 1 1 0 0 1 0 1

0 1 1 1 0 1 1 0

1 0 0 0 0 1 1 1

1 0 0 1 1 0 0 0

1 0 1 0 X X X X

1 0 1 1 X X X X

1 1 0 0 X X X X

1 1 0 1 X X X X

1 1 1 0 X X X X

1 1 1 1 X X X X

BCD Decrement by 1- BCD – Binary Coded Decimal
- Represents ‘0’ through ‘9’ in four bits

- Binary patterns for 10-15 are invalid inputs

- Decrement by 1 function
- N2 = N1 – 1
- 0 – 1 = 9 (rolls over)

W

Z

X

CD

CD

CD

CD

00

00

00

00

01

01

01

01

11

11

11

11

10

10

10

10

AB

AB

AB

AB

0

0

0

0

0

1

0

1

0

0

0

0

00

00

00

00

m1

m1

m1

m1

m2

m2

m2

m2

m0

m0

m0

m0

m3

m3

m3

m3

0

1

1

1

1

1

0

0

0

0

0

0

01

01

01

01

m5

m5

m5

m5

m6

m6

m6

m6

m4

m4

m4

m4

m7

m7

m7

m7

B

B

B

B

x

x

x

x

x

x

x

x

x

x

x

x

11

11

11

11

A

A

A

A

m13

m13

m13

m13

m14

m14

m14

m14

m12

m12

m12

m12

m15

m15

m15

m15

x

x

x

x

x

x

0

1

1

1

0

C

C

C

C

0

10

10

10

10

m9

m9

m9

m9

m10

m10

m10

m10

m8

m8

m8

m8

m11

m11

m11

m11

D

D

D

D

0

0

1

1

1

0

1

0

x

x

x

x

x

x

1

0

BCD Decrement by OneW =

A’B’C’D’

+AD

X =

BD

+BC

+AD’

Y =

CD

+BC’D’

+AD’

Z =

D’

Download Presentation

Connecting to Server..