Professional Documents
Culture Documents
A B C B# C A 1 B# C A 1 B A 1 C 1 A 1 B2 # 1 A 1 C 2
0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0
0 1 0 0 0 1 0 0
0 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1
1 0 1 0 1 1 1 1
1 1 0 0 1 1 1 1
1 1 1 1 1 1 1 1
5 Likewise we can use a truth table to show that we can treat bracketed
terms in the same way as in ordinary algebra, e.g.
A# B1C 5A#B1A#C
6 Anything ORed with its own inverse equals 1:
A1A51
7 Anything ANDed with its own inverse equals 0:
A#A50
8 Anything ORed with a 0 is equal to itself; anything ORed with a 1 is
equal to 1. Thus A 1 0 5 A and A 1 1 5 1.
9 Anything ANDed with a 0 is equal to 0; anything ANDed with a 1 is
equal to itself. Thus A # 0 5 0 and A # 1 5 A.
588 APPENDIX C BOOLEAN ALGEBRA
C.2 De Morgan’s
laws As illustrated above, the laws of Boolean algebra can be used to simplify Boolean
expressions. In addition we have what are known as De Morgan’s laws:
1 The inverse of the outcome of ORing A and B is the same as when the
inverses of A and B are separately ANDed. The following truth table
shows the validity of this.
A1B5A#B
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0
2 The inverse of the outcome of ANDing A and B is the same as when the
inverses of A and B are separately ORed. The following truth table shows
the validity of this:
A#B5A1B
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
C &
C
(a)
B B
≥1
A A
&
C ≥1
C
(b)
For two OR gates driving a single AND gate (Figure C.3(b)), we have
A1B # A1C
This is known as the product of sums form. Thus in considering what
minimum form might fit a given truth table, the usual procedure is to find
590 APPENDIX C BOOLEAN ALGEBRA
the sum of products or the product of sums form that fits the data. Generally
the sum of products form is used. The procedure used is to consider each
row of the truth table in turn and find the product that would fit a row. The
overall result is then the sum of all these products.
Suppose we have a row in a truth table of
A 5 1, B 5 0 and output Q 5 1
When A is 1 and B is not 1 then the output is 1, thus the product which fits
this is
Q5A#B
We can repeat this operation for each row of a truth table, as the following
table indicates:
A B Output Products
0 0 0 A #B
0 1 0 A #B
1 0 1 A #B
1 1 0 A #B
However, only the row of the truth table that has an output of 1 need be
considered, since the rows with 0 output do not contribute to the final
expression; the result is thus
Q5A#B
The logic gate system that will give this truth table is thus that shown in
Figure C.4.
B B
1
As a further example, consider the following truth table, only the products
terms giving a 1 output being included:
A B C Output Products
0 0 0 1 A#B#C
0 0 1 0
0 1 0 1 A#B#C
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
APPENDIX C BOOLEAN ALGEBRA 591
A A 1 A 1 1
A B Output Products
0 0 0 A#B
0 1 0 A#B
1 0 1 A#B
1 1 0 A#B
Chapter five
Objectives
The objectives of this chapter are that, after studying it, the reader should be able to:
Suppose we have a gate giving a high output only when both input A and
input B are high; for all other conditions it gives a low output. This is an AND
logic gate. We can visualise the AND gate as an electric circuit involving
two switches in series (Figure 5.1(a)). Only when switch A and switch B
are closed is there a current. Different sets of standard circuit symbols for
logic gates have been used, with the main form being that originated in the
United States. An international standard form (IEEE/ANSI), however, has
now been developed; this removes the distinctive shape and uses a rectangle
with the logic function written inside it. Figure 5.1(b) shows the US form
of symbol used for an AND gate and (c) shows the new standardised form,
the & symbol indicating AND. Both forms will be used in this book. As
illustrated in the figure, we can express the relationship between the inputs
and the outputs of an AND gate in the form of an equation, termed a
Boolean equation (see Appendix C). The Boolean equation for the AND
gate is written as
A#B5Q
Inputs
Output
A B Q
0 0 0
0 1 0
1 0 0
1 1 1
114 CHAPTER 5 DIGITAL LOGIC
Consider what happens when we have two digital inputs which are functions
of time, as in Figure 5.2. Such a figure is termed an AND gate timing
diagram. There will only be an output from the AND gate when each of the
inputs is high and thus the output is as shown in the figure.
Q
Time
Inputs
Output
A B Q
0 0 0
0 1 1
1 0 1
1 1 1
Q
Time
(c)
The symbols used for an OR gate are shown in Figure 5.3(b); the use of a greater
than or equal to 1 sign to depict OR arises from the OR function being true if at
least more than one input is true. Figure 5.3(c) shows a timing diagram.
A NOT gate has just one input and one output, giving a 1 output when the
input is 0 and a 0 output when the input is 1. The NOT gate gives an output
which is the inversion of the input and is called an inverter. Figure 5.4(a)
shows the symbols used for a NOT gate. The 1 representing NOT actually
symbolises logic identity, i.e. no operation, and the inversion is depicted by
the circle on the output. Thus if we have a digital input which varies with
time, as in Figure 5.4(b), the out variation with time is the inverse.
(a) (b)
Input Output
A Q
0 1
1 0
B
A A
Output Output
Inputs & 1 Inputs &
A.B A.B A.B Q
B B
Inputs
Output
A B Q
0 0 1
0 1 1
1 0 1
1 1 0
A#B5Q
Figure 5.5(c) shows the output that occurs for a NAND gate when its two
inputs are digital signals which vary with time. There is only a low output
when both the inputs are high.
B
A A
Output Output
Inputs ≥1 1 Inputs ≥1
A+B A+B A+B Q
B B
(a) (b) (c)
5.2 LOGIC GATES 117
Inputs
Output
A B Q
0 0 1
0 1 0
1 0 0
1 1 0
A A B
Output Output
Inputs ≥1 =1
A+B A+B Q
B B
1
Inputs
Output
A B Q
0 0 0
0 1 1
1 0 1
1 1 0
The truth table, with the intermediate and final outputs, is as follows:
A B C D Q
0 0 1 1 0
0 1 1 0 0
1 0 0 1 0
1 1 0 0 1
The result is the same as an AND gate. If we followed this assembly of gates
by a NOT gate then we would obtain a truth table the same as a NAND gate.
A combination of three NAND gates is shown in Figure 5.9. The truth
table, with the intermediate and final outputs, is as follows:
A B C D Q
0 0 1 1 0
0 1 1 0 1
1 0 0 1 1
1 1 0 0 1