• Aucun résultat trouvé

LAWS Of BOOLEAN ALGEBRA

Dans le document Digital Engineering (Page 134-140)

Background for Digital Design

3.10 LAWS Of BOOLEAN ALGEBRA

(a) NANDINORIXORJINV logic circuit. (b) truth table, and (c) logic waveforms for the function Y with active high inputs and mixed logic outputs.

remain the same as those shown for the active high signals, but with opposite activation levels. However, the physical nature of the devices required for implementation would now become NAND/EQV IORI ANDIINV as taken from input to output.

Another interesting facet of the mixed logic method is the fact that an inverter on the output stage permits the generation of mixed rail output signals. The Y(L) and Y(H) signals constitute the mixed rail outputs and have waveforms that are identical if account is not taken of the propagation delay through the inverter. In the physical domain, however, the voltage waveforms represented by Y(L) and Y(H) would be the inverse of one another.

3.10 LAWS Of BOOLEAN ALGEBRA

To design a digital circuit that will perform a given function, it may be necessary to ma-nipulate and combine the various switching variables in certain ways that are in agreement with mathematical logic. Use of the laws of Boolean algebra makes these manipulations and combinations relatively simple. This special mathematical logic, named in recognition of the English mathematician George Boole, can be rigorously and eloquently presented by using axioms, theorems, and corollaries. However, for our purposes there is no need for such a formal approach. The laws of Boolean algebra are relatively few and can be deduced

106 CHAPTER 3/ BACKGROUND FOR DIGITAL DESIGN

from the truth tables for NOT, AND, and OR. In this section these laws are developed exclusively within the logic domain with only passing reference to activation levels.

3.10.1 NOT, AND, and OR laws

NOT Laws The unary operator NOT is the logic equivalent of complementation and connotes inversion in the sense of supplying the lack of something. Although NOT is purely a logic concept and complementation arises more from a physical standpoint, the two terms, NOT and complementation, will be used interchangeably following established practice.

The truth table for NOT is the positive logic interpretation of the physical truth table given in Fig. 3.6b. It is from this truth table that the NOT laws are derived.

NOT

Truth Table NOT Laws

* o .

0 1

... X 0=1 I

0 X (3.6)

The NOT operation, like complementation, is designated by the overscore (or "bar"). A double bar (or double complementation) of a function, sometimes called involution, is the function itself, as indicated in Eqs. (3.6).

As examples of the applications of the NOT laws, suppose that X _ A

B.

Then the function

X

= A B is read as A AND B bar the quantity complemented. and

X =

A B

=

A B . Or, if Y 0, then

Y 0

= 1, etc. Finally, notice that Eqs. (3.2) can be generated one from the other by involution-even in mixed logic notation. Thus, a(L) &(H) a(H), and so on.

AND Laws The AND laws are easily deduced by taking the rows two at a time from the truth table representing the logic AND interpretation of the AND gate given in Fig. 3.16c.

Thus, by taking Y equal to logic values 0, 1, X, and

X,

the four AND laws result and are given by Eqs. (3.7).

AND

Truth Table AND I~aws

X Y X·y X·O =0

0 0 0 X·I =X (3.7)

0 ] 0

...

X·X=X

0 0 X·X=O

To illustrate the application of the AND laws, let X be the function X = A

+ B

so that (A+B)·O O,(A+B)·I=A+B,(A+B)·(A+B)=A+B, and (A+B).(A+B)

=

O. These laws are valid regardless ofthe complexity of the function X, which can represent any multi variable function.

3.10 LAWS OF BOOLEAN ALGEBRA 107

OR Laws The four OR laws are deduced from the logic OR interpretation of the OR gate given in Fig. 3.17d by assigning to Y the values 0, 1, X, and

X

and are given by Eqs. (3.8).

The OR laws are illustrated by letting X represent the function X =

BC.

Then, according to the OR laws,

BC

+ 0 =

BC, BC

+ 1= 1,

BC

+

BC

=

BC,

and

BC

+

BC

= 1. Here again, use has been made of a multi variable function X to demonstrate the applicability of a fundamental Boolean law, the OR law.

OR

Truth Table OR Laws

X Y X+Y X+O=X

0 0 0 X

+

I = I (3.8)

0

X+X=X

1 0 X+X=1

Notice that the AND and OR laws are easily verified by substituting 0 and I for the multivariable function X in the examples just given, and then comparing the results with the AND and OR truth tables.

3.10.2 The Concept of Duality

An inspection of the AND and OR laws reveals an interesting relationship that may not be obvious at first glance. If the l's and O's are interchanged while the AND and OR operators, (-) and (+), are interchanged, the AND laws generate the OR laws and vice versa. For reference purposes, the interchange of l's and O's simultaneously with the interchange of operators is represented by the double arrows (++) as follows:

{

O++ll (.) ++ (+)

0)++EB

This simultaneous interchange of logic values and operators is called logic duality. The duality between the AND and OR laws is given by Eqs. (3.9).

AND Laws OR Laws

X·O =0 By X+O=X

X·l =X

...

X+ I = I (3.9)

X·X=X Duality X+X=X

X·X=O X+X=1

Perhaps the best way to demonstrate duality is by the two dual sets

(A 0) B)[AB + .1B] = 0 .... - - . . (A EB B) + [(A + B) . (A + B)] = I and

X 0) (X

+

y)

=

X . Y . - - - . X EB (X . y)

=

X

+

Y,

108 CHAPTER 3 / BACKGROUND FOR DIGITAL DESIGN

where the double arrow ( +---+ ) again represents the duality relationship of the set. For each dual set it can be seen that an operator in the left side equation has been replaced by its dual in the right side while the logic 0 and 1 (in the first dual set) are interchanged. Note that the two equations in a given set are not algebraically equal-they are duals of each other. However, a dual set of equations are complementary if an equation is equal to logic 1 or logic 0 as in the first example. Such is not the case for the second set. The concept of duality pervades the entire field of mathematical logic, as will become apparent with the development of Boolean algebra.

3.10.3 Associative, Commutative, Distributive, Absorptive, and Consensus Laws The associative, commutative, distributive, absorptive, and consensus laws are presented straightforwardly in terms of the multivariable functions X, Y, and Z to emphasize their generality, but the more formal axiomatic approach is avoided for the sake of simplicity.

These laws are given in a dual form that the reader may find useful as a mnemonic tool:

Associative Laws operators are simultaneously interchanged. The dual set of distributive laws in Eqs. (3.12) occur so often that they are sometimes given the names factoring law and distributive law for the first and second, respectively. The factoring law draws its name from its similarity to the factoring law of Cartesian algebra.

Although rigorous proof of these laws will not be attempted, they are easily verified by using truth tables. Shown in Figs. 3.33 and 3.34 are the truth table verifications for the AND form of the associative law and the factoring law. Their dual forms can be verified in a similar manner.

Proof of the commutative laws is obtained simply by assigning logic 0 and logic 1 to the X's and Y's in the two variable forms of these laws and then comparing the results with the AND and OR truth tables given by Eqs. (3.7) and (3.8), respectively.

The distributive law can also be verified by using truth tables. However, having verified the factoring law, it is simpler to prove this law with Boolean algebra by using the factoring

3.10 LAWS OF BOOLEAN ALGEBRA 109

Decimal X Y Z X·y y·z (X· Y).

z

(y. Z) X·Y·Z

0 0 0 0 0 0 0 0 0

I 0 0 I 0 0 0 0 0

2 0 I 0 0 0 0 0 0

3 0 I 1 0 I 0 0 0

4 I 0 0 0 0 0 0 0

5 I 0 1 0 0 0 0 0

6 1 1 0 1 0 0 0 0

7 1 1 1 1 1 1 1 1

FIGURE 3.33

Truth table for the AND form of the associative laws in Eqs. (3.10).

law together with the AND and OR laws. This is done in the following sequence of steps by using square brackets to draw attention to those portions where the laws indicated on the right are applied:

[(X

+

Y)(X

+

Z)]

=

[X· (X

+

Z)]

+

[Y . (X

+

Z)] Factoring law (applied twice)

=

[X· X]

+

(X· Z)

+

(Y . X)

+

(Y . Z) AND law (X . X

=

X)

=

[X

+

(X . Z)

+

(Y . X)]

+

(Y . Z)

=

X . [1

+

Z

+

Y]

+

(Y . Z)

=

X

+

(Y· Z).

Factoring law

OR law (1

+

Z

+

Y = I)

In similar fashion the second of the absorptive laws is proven as follows:

X

+

XY = [(X

+

X)(X

+

Y)] Distributive and OR laws

= 1 . (X

+

Y) AND law (l . (X

+

Y) = X

+

Y)

=X+Y.

The remaining absorptive law is easily proved by first applying the factoring law followed by the AND law X .

X =

O. Duality can also be used as a validation of one form once its dual is proven.

Decimal X Y Z x·y X·Z Y+Z (X . Y)

+

(X . Z) (Y

+

Z)

0 0 0 0 0 0 0 0 0

1 0 0 1 0 0 1 0 0

2 0 1 0 0 0 1 0 0

3 0 1 1 0 0 1 0 0

4 1 0 0 0 0 0 0 0

5 1 0 1 0 1 1 1 1

6 1 1 0 1 0 1 1 1

7 1 1 1 1 1 1 1 1

FIGURE 3.34

Truth table for the factoring law given in Eqs. (3.12).

110 CHAPTER 3/ BACKGROUND FOR DIGITAL DESIGN

The first of the consensus laws in Eqs. (3.14) is proven by applying the OR and factoring laws:

OR law and factoring law Factoring law

XY

+

XZ

+

YZ=XY

+

XZ

+

[(X

+

X)YZ]

=XY+XZ+[XYZ+XYZ]

= [XY(l

+

Z)]

+

[XZ(l

+

Y)]

=XY+XZ.

Factoring law (applied twice); OR law

Proof of the second of the consensus laws follows by duality.

3.10.4 DeMorgan's Laws

In the latter half of the nineteenth century, the English logician and mathematician Augustus DeMorgan proposed two theorems of mathematical logic that have since become known as DeMorgan's theorems. The Boolean algebraic representations of these theorems are commonly known as DeMorgan's laws. In terms of the two multivariable functions X and Y, these laws are given in dual form by

DeMorgan's Laws (3.15)

More generally, for any number of functions, the DeMorgan laws take the following form:

and (3.15a)

X

+

Y

+

Z

+ ... +

N

= X . Y . Z ... N.

DeMorgan's laws are easily verified by using truth tables. Shown in Fig. 3.35 is the truth table for the first ofEqs. (3.15).

Application of DeMorgan's laws can be demonstrated by proving the absorptive law X+XY=X+Y:

X

+

XY =

X .

(XY) = X . (X

+

Y) = X . X

+

X . Y =

X . Y

= X

+

Y.

Notice that the double bar over the term X

+

XY is a NOT law and does not alter the term. Here, DeMorgan's laws are first applied by action of the "inner" bar followed by simplification under the "outer" bar. Final application of DeMorgan's law by application

x y x·y x·y X Y x+y

0 0 0 1 1 1 1

0 1 0 1 1 0 1

1 0 0 1 0 1 1

1 1 1 0 0 0 0

FIGURE 3.35

Truth table for DeMorgan's Law X . Y

=

X

+

Y.

Dans le document Digital Engineering (Page 134-140)