## Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

by J. Crowe and Barrie Hayes-Gill

Ratings:

Length: 336 pages4 hours

This text takes the student from the very basics of digital electronics to an introduction of state-of-the-art techniques used in the field. It is ideal for any engineering or science student who wishes to study the subject from its basic principles as well as serving as a guide to more advanced topics for readers already familiar with the subject. The coverage is sufficiently in-depth to allow the reader to progress smoothly onto higher level texts.

Publisher: Elsevier ScienceReleased: Mar 27, 1998ISBN: 9780080534992Format: book

You've reached the end of this preview. Sign up to read more!

Page 1 of 1

**nicki.dennis@hodder.co.uk **

**1 **

**Fundamentals **

This chapter introduces the essential information required for the rest of the book. This includes a description of Boolean algebra, the mathematical language of digital electronics, and the logic gates used to implement Boolean functions. Also covered are the ‘tools’ of digital electronics such as truth tables, timing diagrams and circuit diagrams. Finally, certain concepts such as duality, positive and negative assertion level logic and universal gates, that will be used in later chapters, are introduced.

The *algebra *of a number system basically describes how to perform arithmetic using the *operators *of the system acting upon the system’s *variables *which can take any of the allowed values within that system. Boolean algebra describes the arithmetic of a two-state system and is therefore the mathematical language of digital electronics. The variables in Boolean algebra are represented as symbols (e.g. *A*, *B*, *C*, *X*, *Y *etc.) which indicate the state (e.g. voltage in a circuit). In this book this state will be either 0 or 1.**¹ Boolean algebra has only three operators: NOT, AND and OR. The symbols representing these operations, their usage and how they are used verbally are all shown in Table 1.1. Note that whereas the AND² and OR operators operate on two or more variables the NOT operator works on a single variable. **

**Table 1.1 **

**Boolean variables and operators **

A circuit contains two variables (i.e. signals), *X *and *Y*, which must be OR’d together. How would this operation be shown using Boolean algebra, and how would you describe it verbally?

*Solution *

The operation would be spoken as *X or Y *and written as *X *+ *Y*.

The output *Y *of a logic circuit with two inputs, *A *and *B*. How would this be described verbally?

*Solution *

This would be spoken as either *Y equals A and B bar*, or alternatively *Y equals A and not B*.

The basic gates (i.e. circuit elements) available in digital electronics perform the three Boolean algebraic operations of NOT, AND and OR. The symbols for these gates are shown in **Fig. 1.1. In order to both design and analyse circuits it is necessary to know the output of these gates for any given inputs. **

**Fig. 1.1 **The three basic Boolean operators

Since any Boolean variable can only be either 0 or 1 (Boolean algebra is a two- state system) then if it is 0 its complement is 1 and vice versa. The NOT gate performs this operation (of producing the complement of a variable) on a logic signal, so if *A *Therefore if *A *= 0 then *Y *= 1, or else *A *= 1 and *Y *= 0 (there are only two possibilities).

The *truth table *of a logic system (e.g. digital electronic circuit) describes the output(s) of the system for given input(s). The input(s) and output(s) are used to label the columns of a truth table, with the rows representing all possible inputs to the circuit and the corresponding outputs. For the NOT gate there is only one input (hence one input column, *A*), which can only have two possible values (0 and 1), so there are only two rows.**³ As there is only one output, Y, there is only one output column. The truth table for the NOT gate in Table 1.2 shows that Y = 1 if A = 0, and Y = 0 if A , the complement of A. The NOT gate is also sometimes referred to as an inverter due to the fact that it complements (inverts) its input. **

**Table 1.2 **

**Truth tables for the three basic logic gates **

The AND operator takes a number of variables as its input and produces one output whose value is 1 if and only if *all *of the inputs are 1. That is *the output is 1 if input 1 *and *input 2 *and *all the other inputs are 1*. Hence its name.

Considering a two-input (although it can be any number) AND gate its truth table will have two input columns, *A *and *B*, and one output column, *Y*. With two inputs there are 2² = 4 input combinations (since both *A *and *B *can be either 0 or 1) and so four rows. The output of the gate, *Y*, will be 0 unless all (i.e. both *A *and *B*) inputs are 1, so only the last row when *A *and *B *are 1 gives an output of 1. The truth table (see **Table 1.2) describes completely the output from an AND gate for any combination of inputs. **

Alternative, but exactly equivalent, descriptions of this operation are given by use of either the circuit symbol or the Boolean equation, *Y *= *A *· *B*. (This is true of all combinational logic circuits.)

Consider a three-input AND gate. How many columns and rows would its truth table have? What would the Boolean expression describing its operation be? What would its truth table and circuit symbol be?

*Solution *

The truth table would have four columns; three for the inputs and one for the output. Since there are three inputs it would have 2³ = 8 rows corresponding to all possible input combinations. Its Boolean algebraic expression would be *Y *= *A *· *B *· *C*, assuming the inputs are *A*, *B *and *C*. Its truth table and circuit symbol are shown in **Fig. 1.2. **

**Fig. 1.2 **Truth table and symbol for a three-input AND gate as discussed in **Example 1.3 **

The OR operator takes a number of variables as its input and produces an output of 1 if *any *of the inputs are 1. That is *the output is 1 if input 1 *or *input 2 *or *any input is 1*. The layout of the truth table for a two-input OR gate is the same as that for the two-input AND gate for the same reasons given above (since both have two inputs and one output). The entries in the output column are all that differ with *Y *= 1 whenever any input, either *A *or *B*, is 1.**⁴ Note that this includes an output of 1 if both inputs are 1.⁵ The Boolean algebraic equation for this gate is Y = A + B. **

Draw the circuit symbol and truth table for a four-input OR gate.

*Solution *

These are shown in **Fig. 1.3. **

**Fig. 1.3 **Truth table and symbol for a four-input OR gate as discussed in **Example 1.4 **

, *Y *= *A *· *B *and *Y *= *A *+ *B*, the additional rules and laws of Boolean logic which are needed will now be introduced.

As the heading suggests, this section details those rules which describe the operation of logic gates when only one variable is present. Note that these laws, given in **Table 1.3, provide exactly the same information as the truth tables. **

**Table 1.3 **

**Single-variable Boolean theorems **

Idempotent laws: Rows 1 and 4 of the truth tables, demonstrate the effect of a variable operating upon itself:

**(1.1) **

**(1.2) **

Property of inverse elements: Rows 2 and 3 of the truth tables show the effect of a variable operating on its complement:

**(1.3) **

**(1.4) **

Involution (NOT) law:

**(1.5) **

Property of identity elements: The effect of operating on a variable with 0 or 1:

**(1.6) **

**(1.7) **

**(1.8) **

**(1.9) **

The idempotent**⁶ laws describe the effect of a variable operating upon itself (i.e. the same variable goes to all inputs). For the two-input AND gate this gives Y = A · A which will give 1 if A = 1, and 0 if A = 0; hence Y = A · A = A. **

The OR operator gives exactly the same result and these laws give the outputs in rows 1 and 4 (see **Table 1.2) of the truth tables. **

The law of *inverse elements *describes the effect of operating on a variable, *A*, since *A *must have complementary values and therefore *Y *= 0.

, since either *A *must be 1. This law describes the operations in rows 2 and 3 of the truth tables.

Note that the truth tables could be derived from the above three laws as they give exactly the same information. It will become apparent that there is always more than one way of representing the information in a digital circuit, and that you must be able to choose the most suitable representation for any given situation, and also convert readily between them.

The above laws give all of the information held in the truth tables. However another way of expressing this information is as the *properties of identity elements*. These just give the output of the AND and OR gates when a variable, *A*, is operated on by a constant (an identity element). (So for a two-input gate one of the inputs is held at either 0 or 1.) Obviously these laws, shown in **Table 1.3, can also be used to completely determine the truth tables. **

Note that **Equation 1.6 in Table 1.3 states that AND’ing any variable (or Boolean expression) with 0 gives 0, whilst Equation 1.9 means that OR’ing any variable (or Boolean expression) with 1 gives 1. However AND’ing with 1 (Equation 1.7) or OR’ing with 0 (Equation 1.8) gives the Boolean value of the variable or expression used in the operation. **

What is the result of the operations (*X *· 0) and ((*X *· *Y*) +1)?

*Solution *

The output from (*X *· 0) will be 0, since anything AND’d with 0 gives a digital output of 0. The result of ((*X *· *Y*)+1) will be 1, since any expression OR’d with 1 gives 1. Note that in the second example it is the Boolean expression (*X *· *Y*) (which must be either 0 or 1) that is OR’d with 1.

What is the result of the operations (*Y *· 1) and ((*X *· *Y*)+0)?

*Solution *

The outputs will be whatever the digital values of *Y *and (*X *· *Y*) are, since anything AND’d with 1 or OR’d with 0 is unchanged.

These rules describe the operations of Boolean algebra when more than one variable is present. This includes defining the equivalence of certain groups of operations (i.e. groups of gates forming a circuit). All of the multivariable theorems described below are given in **Table 1.4. **

**Table 1.4 **

**Multivariable Boolean theorems **

Commutative laws: Show that the order of operation under AND and OR is unimportant:

**(1.10) **

**(1.11) **

Associative laws: Show how variables are grouped together:

**(1.12) **

**(1.13) **

Distributive laws: Show how to expand equations out:

**(1.14) **

**(1.15) **

De Morgan’s theorem:

**(1.16) **

**(1.17) **

Other laws which can be proved from the above are the:

Absorption laws:

**(1.18) **

**(1.19) **

and ‘other identities’:

**(1.20) **

**(1.21) **

These simply state that it does not matter which way two variables are AND’d or OR’d together. So

This is the same as saying it does not matter which inputs of a two-input gate the two variables are connected to.

These show how operations can be associated with each other (grouped together). Essentially if three or more variables are to be AND’d or OR’d together it does not matter in which order it is done. This is relevant if three variables are to be operated upon and only gates with two inputs are available.

If only two input OR gates are available draw the circuit to implement the Boolean expression *Y *= *A *+ *B *+ *C*.

*Solution *

The circuit is shown in **Fig. 1.4. Note that because of the associative law it does not matter which two of the three variables are OR’d together first. **

**Fig. 1.4 **Implementation of *Y *= *A *+ *B *+ *C *using two-input OR gates as discussed in **Example 1.7 **

The rules given by the commutative and associative laws are intuitive. However, the remaining multivariable theorems require more thought and are less obvious. The distributive laws (**Equations 1.14 and 1.15) show how to expand out Boolean expressions and are important because it is upon them that the factorisation, and hence simplification, of such expressions are based. **

What does the expression (*A*+*B*) · (*C*+*D*) become when expanded out?

*Solution *

Doing this rigourously let us replace the Boolean expression (*A *+ *B*) with *X*. (This sort of substitution of one Boolean expression for another is perfectly legitimate.) We then have *X *· (*C *+ *D*) to expand, which using the distributive law becomes

Using the commutative law to reverse these AND’d expressions and then the distributive law again gives the result of

De Morgan’s theorem states (**Equation 1.16) that complementing the result of OR’ing variables together is equivalent to AND’ing the complements of the individual variables. Also (Equation 1.17), complementing the result of AND’ing variables together is equivalent to OR’ing the complements of the individual variables. **

, to show that the form given in **Equation 1.16 for three variables is also true. **

*Solution *

Draw the circuits that will perform the functions described by both sides of the first of De Morgan’s theorems (**Equation 1.16) given in Table 1.4, and also demonstrate the theorem is true using a truth table. **

*Solution *

The circuits and truth table are shown in **Fig. 1.5. **

**Fig. 1.5 **Solution to **Example 1.10 regarding De Morgan’s theorem **

De Morgan’s theorems prove very useful for simplifying Boolean logic expressions because of the way they can ‘break’ an inversion, which could be the complement of a complex Boolean expression.

but only requires a single inversion.

*Solution *

De Morgan’s theorems can also be used to express logic expressions not originally containing inversion terms in a different way. This can again prove useful when simplifying Boolean equations. When used in this way care must be taken not to ‘forget’ the final inversion, which is easily avoided by complementing both sides of the expression to be simplified before applying De Morgan’s theorem, and then complementing again after simplification. The following example illustrates this point.

Use De Morgan’s theorem to express *Y *= *A *+ *B*, the OR operation, in a different form.

*Solution *

.

Finally we note that one way of interpreting De Morgan’s theorem is that *any *AND/OR operation can be considered as an OR/AND operation as long as NOT gates are used as well (see last example). This approach will be considered later on in this chapter when we look at the principle of duality in **Section 1.6. **

Although these can be proved from the above laws, they nevertheless merit inclusion in their own right as they are often used to simplify Boolean expressions. Their value is clear since they take an expression with two variables and reduce it to a single variable. (For example *B *is ‘absorbed’ in an expression containing *A *and *B *leaving only *A*.)

Use Boolean algebra to rigorously prove the first absorption law (**Equation 1.18) **

*Solution *

The remaining identities are grouped together under this heading since, like the absorption laws, they can be proved from the earlier theorems, but nevertheless are not entirely obvious or expected. These identities are again valuable when trying to simplify complicated Boolean expressions.

Use Boolean algebra and a truth table to rigorously prove the first ‘other identity’ (**Equation 1.20) **

*Solution *

The truth table is shown in **Table 1.5. **

**Table 1.5 **

**Truth table for Equation 1.20 as discussed in Example 1.14 **

You may have wondered why the AND and OR operations are indicated by the symbols for multiplication, ·, and addition, +. The reason is that many of the laws in **Table 1.3 and 1.4 hold for both Boolean and ordinary algebra. Indeed, of all the Boolean laws not involving complements (inversions) the only ones that are not true in ordinary algebra are 1.1, 1.2, 1.9, 1.15 and the absorption laws. **

It is for this reason that variables AND’d together are often referred to as *product *terms and variables OR’d together as *sum *terms. Hence the expression:

is a *sum of products *expression. The two product terms are (*A *· *B*which are then summed (OR’d) together. We will return to the use of this kind of terminology in **Chapter 3. **

A final point on this topic is that in the same way that multiplication takes precedence over addition so too does AND’ing over OR’ing. That is why when sum terms are to be AND’d together they are enclosed in brackets.

, what sum terms are included in it, and what is its expanded form?

*Solution *

This is a *product of sums *+ *B*) and (*A *+ *B*). Using Boolean algebra:

(This is the Boolean expression for the exclusive-NOR gate discussed in the next section.)

Digital electronics is about designing and analysing circuits and although this could be done using only the mathematical language of Boolean algebra introduced above, it is often more convenient to use circuit diagrams to show how the logic gates are connected together. The logic symbols for the three basic Boolean operators have already been given in **Fig. 1.1, and are included again in Fig. 1.6 which shows all of the logic gates that are commonly used together with their Boolean algebraic expressions, truth tables and the alternative IEEE/ANSI symbols for the gates. **

**Fig. 1.6 **Logic symbols, Boolean operators and truth tables of the common logic gates

The gates shown in **Fig. 1.6 include the NAND and NOR gates which are the NOT’d versions of the AND and OR gates (i.e. NOT-AND and NOT-OR). This simply means that their outputs are inverted, which is indicated by the bubbles on the outputs.⁷ They are equivalent to AND and OR gates whose outputs are then passed through an inverter (NOT gate). **

The other new gate introduced at this stage is the exclusive-OR (XOR) gate whose *output is 1 *if and only if *an odd number of inputs are 1*. So a two-input XOR gate differs from the corresponding OR gate because *Y *= 0 if both *A *and *B *are 1 since in this case an even number of inputs is 1. The Boolean expression for the output from a two-input XOR gate is:

Write out the truth table for a three-input XOR gate and draw its circuit symbol.

*Solution *

These are shown in **Fig. 1.7 **

**Fig. 1.7 **Truth table and symbol for a three-input XOR gate (see **Example 1.16) **

In addition to the operation of logic circuits being described in terms of Boolean equations and circuit diagrams, remember that truth tables can also be used, as shown in **Table 1.2. To recap, a truth table shows how the output(s) of a circuit (i.e. whether 0 or 1) depends upon the input(s). We now have three ways of representing the operation of a digital circuit: by a Boolean algebraic expression; a circuit diagram; or a truth table. Note that the rows of the truth table are ordered in binary code: i.e. 000, 001, 010, 011, etc. (for a table with three input variables). **

stating what single gate it is functionally equivalent to. Then prove this equivalence using Boolean algebra.

*Solution *

The circuit and truth table are shown in **Fig. 1.8. This complete circuit performs the function of an XOR gate. **

Close Dialog## Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

Loading