19
Circuit Minimization

Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Embed Size (px)

Citation preview

Page 1: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Circuit Minimization

Page 2: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Circuit Minimization• It is often uneconomical to realize a logic directly from the

first logic expression that pops into your head.• Canonical sum and product expressions are especially

expensive because the number of possible minterms or maxterms grows exponentially and hence gate with the number of variables.

• We reduce a combinational circuit by reducing the number and size of gates that are needed to build it.

Page 3: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Circuit Minimization• We can minimize the circuit function using Boolean

postulates and theorems.• But it very difficult to find terms that can be combined in a

jumble of algebraic symbols.• It lacks specific rules to predict each succeeding step in the

manipulative process.• Solution to this is the Karnaugh Map method.

– This map method provides a simple straightforward procedure for minimizing Boolean function.

– First proposed by Veitch and modified by Karnaugh, known as Veitch diagram or Karnaugh map.

Page 4: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Karnaugh Map• A Karnaugh map is a graphical representation of a logic

function’s truth table.• It is diagram made up of squares.• Each square represents one minterm.• Since any Boolean function can be expressed as a sum of

minterms, the map presents a visual diagram of all possible ways a function may be expressed in a standard form.

• By recognizing various patterns, the user can derive alternative algebraic expressions for the same function, from which he/she can select the simplest one.

• Simplest algebraic expression is one that has a minimum number of literals and can be expressed as sum of products or product of sums.

Page 5: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Two, three and four input maps

Page 6: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Karnaugh Map• The minterms are not arranged in a binary sequence, but in

a sequence similar to the Gray code.• The characteristic of this sequence is that only one bit

changes from 1 to 0 or from 0 to 1.• Any two adjacent squares in the map differ by only one

variable, which is primed in one square and unprimed in the other.

• From the postulates of Boolean algebra, it follows that the sum of two adjacent minterms can be simplified to a single AND term consisting of one less literals.

e.g., x.y + x.y’ = x.(y+y’) = x + 1 = x

Page 7: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Visualizing T10 -- Karnaugh maps

Page 8: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

3-variable Karnaugh map

Page 9: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Example: F = (1,2,5,7)

Page 10: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Karnaugh-map usage• Plot 1s corresponding to minterms of function.• Circle largest possible rectangular sets of 1s.

– # of 1s in set must be power of 2– OK to cross edges

• Read off product terms, one per circled set.– Variable is 1 ==> include variable– Variable is 0 ==> include complement of variable– Variable is both 0 and 1 ==> variable not included

• Circled sets and corresponding product terms are called “prime implicants”

• Minimum number of gates and gate inputs

Page 11: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Prime implicant• A prime implicant of a logic function F(XYZ) is a normal

product term P(XYZ) that implies F, such that if any variable is removed from P, then the resulting product term does not imply F.

• a prime implicant of F is a circled set of 1-cells satisfying our combining rule, such that if we make it larger, it covers one or more 0s.

Page 12: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Prime-number detector (again)

Page 13: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

• When we solved algebraically, we missed one simplification -- the circuit below has three less gate inputs.

Page 14: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Another example

Page 15: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Yet another example

• Distinguished 1 cells• Essential prime implicants

Page 16: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

the minimal sum• A distinguished 1-cell of a logic function is an input

combination that is covered by only one prime implicant.• An essential prime implicant of a logic function is a prime

implicant that covers one or more distinguished 1-cells.• The minimal sum is the sum of essential prime implicants.

Page 17: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

Simplifying Products of Sums• In general, to find the lowest-cost realization of a logic

function, we have to find both a minimal sum and a minimal product and compare them.

• Each 0 on the map corresponds to a maxterm in the canonical product of the logic function.

10011011i = 01234567

F = x,y,z (0,3,4,6,7) = F = x,y,z (1,2,5)

(F’)’ = (x,y,z (1,2,5))’find the minimal sum for the compliment of F and apply DeMorgan’s theorem.

Page 18: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

“don’t-care” input combinations• Sometimes the specification of a combinational circuit is

such that its output doesn’t matter for certain input combinations, called don’t-cares.

• For example, suppose we wanted to build a prime-number detector whose 4-bit input is always a BCD digit; then minterms 10~15 should never occur.

F = N3N2N1N0(1, 2, 3, 5, 7) + d(10,11,12,13,14,15)

Page 19: Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and

don’t-care” input combinations