Файл: Digital design with CPLD applications and VHDL (R. Dueck, 2000).pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 13.06.2025

Просмотров: 8150

Скачиваний: 6

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.

74 C H A P T E R 3 • Boolean Algebra and Combinational Logic

The distributive property allows us to “multiply through” an AND function across several OR functions. For example,

Theorem 5: x(y z) xy xz

and

Theorem 6: (x y)(w z) xw xz yw yz

Figure 3.23 shows the logic gate equivalents of these theorems.

FIGURE 3.23

Distributive Properties

EXAMPLE 3.9

FIGURE 3.24

Example 3.9

Distributive Property

Find the Boolean expression of the POS circuit in Figure 3.24a. Apply the distributive property to transform the circuit to an SOP form.

A

B

Y

C

D

a. POS form

A

B

C

D

AC

BC

Y

AD

BD

b. SOP form

3.3 • Theorems of Boolean Algebra

75

Solution The Boolean expression for Figure 3.24a is Y (A B)(C D). Using the distributive property, we get the expression Y A C BC AD BD. The logic diagram for this expression is shown in Figure 3.24b.

In Example 3.9, we see that the distributive property can be used to convert a POS circuit to SOP or vice versa. In this case, the circuit was not simplified, just transformed.

EXAMPLE 3.10

FIGURE 3.25

Example 3.10

Distributive Property

Write the Boolean expression for the circuit in Figure 3.25a. Use the distributive property to convert this to an SOP circuit.

A

B

C

D

Y

E

F

a. POS form

A B C D E F

ABCE

ABCF

Y

ABDE

ABDF

b. SOP form

Solution The Boolean expression for Figure 3.25a is AB(C D)(E F). The distributive property can be applied in two stages:

Y (ABC ABD)(E F)

ABCE ABCF ABDE ABDF

The logic diagram for this equation is shown in Figure 3.25b. This results in a network that is “wider” (more gates on one level), but also “flatter” (fewer levels). The advantage of the second circuit is that signals would pass through the network faster, since it has fewer

levels of gating.

Single-Variable Theorems

There are thirteen theorems that can be used to manipulate a single variable in a Boolean expression. An easy way to remember these theorems is to divide them into three groups:

1.Six theorems: x AND/OR/XOR 0/1

2.Six theorems: x AND/OR/XOR x/ x

3.One theorem: Double Inversion


76 C H A P T E R 3 • Boolean Algebra and Combinational Logic

x AND/OR/XOR 0/1

The theorems in the first group can be generated by asking what happens when x, a Boolean variable or expression, is at one input of an AND, an OR, or an XOR gate and a 0 or a 1 is at the other.

Examine the truth table of the gate in question. Hold one input of the gate constant and find the effect of the other on the output. This is the same procedure we used in Chapter 2 to examine the enable/inhibit properties of logic gates.

Each of these six theorems can be represented by a logic gate, as shown in Figure 3.26.

FIGURE 3.26

X AND/OR/XOR 0/1

x 0:

A

x

Y

0

0

0

0

1

0

1

0

0

1

1

1

If x 0, Y 0

If x 1, Y 0

(Can never have both inputs HIGH, therefore output is always LOW.)

Theorem 7: x 0 0

x 0:

A x Y

0 0 0

0 1 1

1 0 1

1 1 1

If x 0, Y 0

If x 1, Y 1

(LOW input enables OR gate.)

Theorem 8: x 0 x

x 0:

A x Y

0 0 0

0 1 1

1 0 1

1 1 0

3.3 • Theorems of Boolean Algebra

77

If x 0, Y 0

If x 1, Y 1

(XOR acts as a noninverting buffer.)

Theorem 9: x 0 x

x 1:

A x Y

0 0 0

0 1 0

1 0 0

1 1 1

If x 0, Y 0

If x 1, Y 1

(HIGH input enables AND gate.)

Theorem 10: x 1 x

x 1:

A x Y

0 0 0

0 1 1

1 0 1

1 1 1

If x 0, Y 1

If x 1, Y 1

(One input always HIGH, therefore output is always HIGH.)

Theorem 11: x 1 1

x 1:

A x Y

0 0 0

0 1 1

1 0 1

1 1 0

If x 0, Y 1

If x 1, Y 0

(XOR acts as an inverting buffer.)

Theorem 12 x 1 x

x AND/OR/XOR x/ x

Six theorems are generated by combining a Boolean variable or expression, x, with itself or its complement in an AND, an OR, or an XOR function.

Again, we can use the AND, OR, and XOR truth tables. For the first three theorems, we look only at the lines where both inputs are the same. For the other three, we use the lines where the inputs are different.


78 C H A P T E R 3 • Boolean Algebra and Combinational Logic

Figure 3.27 shows the logic gates that represent these theorems.

FIGURE 3.27

X AND/OR/XOR X/X

x x:

A

x

Y

0

0

0

0

1

0

1

0

0

1

1

1

If x 0, Y 0

If x 1, Y 1

Theorem 13: x x x

x x:

A

x

Y

0

0

0

0

1

1

1

0

1

1

1

1

If x 0, Y 0

If x 1, Y 1

Theorem 14: x x x

x x:

A x Y

0 0 0

0 1 1

1 0 1

1 1 0

If x 0, Y 0

If x 1, Y 0

(Output is LOW if neither input is HIGH or if both are.)

Theorem 15: x x 0

3.3 • Theorems of Boolean Algebra

79

x x:

A

x

Y

0

0

0

0

1

0

1

0

0

1

1

1

If x 0, Y 0

If x 1, Y 0

(Since inputs are opposite, can never have both HIGH. Output always LOW.)

Theorem 16:

x x 0

x x:

A

x

Y

0

0

0

0

1

1

1

0

1

1

1

1

If x 0, Y 1

If x 1, Y 1

(Since inputs are opposite, one input always HIGH. Therefore, output is always HIGH.)

Theorem 17:

x x 1

x x:

A

x

Y

0

0

0

0

1

1

1

0

1

1

1

0

If x 0, Y 1

If x 1, Y 1

(One input HIGH, but not both.)

Theorem 18:

x x 1

Double Inversion

The final single-variable theorem is just common sense. It states that a variable or expres-

x

x

sion inverted twice is the same as the original variable or expression. It is given by:

x

x

Theorem 19:

x x

FIGURE 3.28

This theorem is illustrated by the two inverters in Figure 3.28.

Double Inversion

Multivariable Theorems

There are numerous multivariable theorems we could learn, but we will look only at five of the most useful.


80 C H A P T E R 3 • Boolean Algebra and Combinational Logic

DeMorgan’s Theorems

We have already seen DeMorgan’s theorems. We will list them again, but will not comment further on them at this time.

Theorem 20: xy x y

Theorem 21: x y x y

Other Multivariable Theorems

Theorem 22: x xy x

Proof:

x xy x (1 y) (Distributive property)

x 1 (1 y 1; Theorem)

x

FIGURE 3.29

Theorem 22

Figure 3.29 illustrates the circuit in this theorem. Note that the equivalent is not a circuit at all, but a single, unmodified variable. Thus, the circuit shown need never be built.

x

x xy x

y

xy

EXAMPLE 3.11

Simplify the following Boolean expressions, using Theorem 22 and other rules of Boolean

algebra. Draw the logic circuits of the unsimplified and simplified expressions.

a.

H KL K

b. Y (A B)CD (A B)

c.

W (PQR P Q)(S T) (P Q)(S T) (S T)

Solution Figure 3.30 shows the logic circuits for the unsimplified and simplified versions of the above expressions.

a. Let x K, let y L:

H x xy K KL

Theorem 22 states x xy x. Therefore K KL K. b. Let x (A B), let y CD:

Y x xy x A B

c.Let x S T, let y (P Q):

Since x xy x, (P Q)(S T) (S T) (S T).

W (PQR P Q)(S T) (S T)

Let x S T, let y (PQR P Q)

W x xy x S T

Alternate method:

W (PQR P Q)(S T) (P Q)(S T) (S T)

By the distributive property:

W ((PQR P Q) (P Q))(S T) (S T)

Let x S T, let y ((PQR P Q) (P Q)):

W x xy x S T