- By
**zohar** - Follow User

- 121 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' CS151 Introduction to Digital Design' - zohar

**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

CircuitOptimization

- Goal: To obtain the simplest implementation for a given function
- Optimization is a more formal approach to simplification that is performed using a specific procedure or algorithm
- Optimization requires a cost criterion to measure the simplicity of a circuit
- To distinct cost criteria we will use:
- Literal cost (L)
- Gate input cost (G)
- Gate input cost with NOTs (GN)

CS 151

C

D

D

C

B

B

C

D

B

LiteralCost- Literal – a variable or its complement
- Literal cost – the number of literal appearances in a Boolean expression corresponding to the logic circuit diagram
- Examples:
- F = BD + A C + A L = 8
- F = BD + A C + A + AB L =
- F = (A + B)(A + D)(B + C + )( + + D) L =
- Which solution is best?

CS 151

C

D

B

C

B

D

B

D

C

B

GateInputCost- Gate input costs - the number of inputs to the gates in the implementation corresponding exactly to the given equation or equations. (G - inverters not counted, GN - inverters counted)
- For SOP and POS equations, it can be found from the equation(s) by finding the sum of:
- all literal appearances
- the number of terms excluding terms consisting only of a single literal,(G) and
- optionally, the number of distinct complemented single literals (GN).
- Example:
- F = BD + A C + A G = 11, GN = 14
- F = BD + A C + A + AB G = , GN =
- F = (A + )(A + D)(B + C + )( + + D) G = , GN =
- Which solution is best?

CS 151

L = 5

G =L+ 2 = 7

B

C

A

F

- L (literal count) counts the AND inputs and the single literal OR input.

- G (gate input count) adds the remaining OR gate inputs

C

B

- GN(gate input count with NOTs) adds the inverter inputs

- Example 1:
- F = A + B C +

CS 151

A

A

B

C

F

A

B

C

F

A

C

C

B

CostCriteria(continued)- Example 2:
- F = A B C +
- L = 6 G = 8 GN = 11
- F = (A + )( + C)( + B)
- L = 6 G = 9 GN = 12
- Same function and sameliteral cost
- But first circuit has bettergate input count and bettergate input count with NOTs
- Select it!

CS 151

Map Simplification

- Simplifying Boolean Expressions
- Algebraic manipulation
- Lacks rules for predicting steps in the process
- Difficult to determine if the simplest expression has been reached
- Map simplification (Karnough map or K-map)
- Straightforward procedure for function of up to 4 variables
- Provides a pictorial form of the truth table
- Maps for five and six variables can be drawn, but are more cumbersome to use

CS 151

Karnaugh Maps (K-map)

- A K-map is a collection of squares
- Each square represents a minterm
- Adjacent squares differ in the value of one variable
- Visual diagram of all possible ways a function may be expressed in standard forms
- Sum-of-Products
- Product-of-Sums
- Alternative algebraic expressions for the same function are derived by recognizing patterns of squares select simplest.

CS 151

K-Map Function Representation

- Example: F(X,Y) = XY’ + XY
- From the map, we see that F (X,Y) = X.
- This can be justified using algebraic manipulations:

F(X,Y) = XY’ + XY = X(Y’ +Y) = X.1 = X

1 1

CS 151

1

1

K-Map Function Representation- Example:G(x,y) = m1 + m2 + m3

G(x,y) = m1 + m2 + m3

= X’Y + XY’ + XY

From the map, we can see that G = X + Y

CS 151

Three-Variable Maps

3 variables 8 minterms (m0 – m7).

How can we locate a minterm square on the map?

Use figure (a) OR use column # and row # from figure (b)E.g. m5 is in row 1 column 01 (5 10 = 101 2)

Q. Show the area representing X’? Y’? Z’?

CS 151

0

3

x

2

1

x

4

7

6

5

z

z

z

Alternative Map Labeling- Map use largely involves:
- Entering values into the map, and
- Reading off product terms from the map.
- Alternate labelings are useful:

y

y z

y

x

00

01

11

10

0

3

2

1

0

4

7

6

5

1

x

z

CS 151

1

1

1

Y

Y

YZ

YZ

00

00

01

01

11

11

10

10

X

X

0

0

1

1

X

X

Z

Z

Example Functions- By convention, we represent the minterms of F by a "1" in the map and leave the minterms of F’ blank
- Example:
- Example:
- Learn the locations of the 8 indices based on the variable order shown (x, most significantand z, least significant) on themap boundaries

1

1

1

1

CS 151

Download Presentation

Connecting to Server..