Application: Digital Logic Circuits: Only Connect!
Application: Digital Logic Circuits: Only Connect!
In the late 1930s, a young M.I.T. graduate student named Claude Shannon noticed an
analogy between the operations of switching devices, such as telephone switching
circuits, and the operations of logical connectives. He used this analogy with striking
success to solve problems of circuit design and wrote up his results in his master’s thesis,
which was published in 1938.
The drawing in Figure 2.4.1(a) shows the appearance of the two positions of a simple
switch. When the switch is closed, current can flow from one terminal to the other; when
it is open, current cannot flow. Imagine that such a switch is part of the circuit shown in
Figure 2.4.1(b). The light bulb turns on if, and only if, current flows through it. And this
happens if, and only if, the switch is closed.
MIT Museum
The symbol
denotes a battery and
Claude Shannon the symbol
(1916–2001)
Open Closed denotes a light bulb.
(a) (b)
Figure 2.4.1
Now consider the more complicated circuits of Figures 2.4.2(a) and 2.4.2(b).
P
P Q
Q
In the circuit of Figure 2.4.2(a) current flows and the light bulb turns on if, and only
if, both switches P and Q are closed. The switches in this circuit are said to be in series.
In the circuit of Figure 2.4.2(b) current flows and the light bulb turns on if, and only if, at
least one of the switches P or Q is closed. The switches in this circuit are said to be in
parallel. All possible behaviors of these circuits are described by Table 2.4.1.
Table 2.4.1
(a) Switches in Series (b) Switches in Parallel
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
2.4 Application: Digital Logic Circuits 67
Type of Symbolic
Gate Representation Action
Input Output
P R
NOT P NOT R
1 0
0 1
Input Output
P Q R
P 1 1 1
AND AND R
Q 1 0 0
0 1 0
0 0 0
Input Output
P Q R
P 1 1 1
OR OR R
Q 1 0 1
0 1 1
0 0 0
Figure 2.4.3
Rule (2.4.4) is violated in more complex circuits, called sequential circuits, whose
output at any given time depends both on the input at that time and also on previous
inputs. These circuits are discussed in Section 12.2.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
68 Chapter 2 The Logic of Compound Statements
P NOT
AND R
b. Input signals: P = 1, Q = 0, R = 1
P
OR NOT
Q
AND S
R
Solution
a. Move from left to right through the diagram, tracing the action of each gate on the
input signals. The NOT-gate changes P = 0 to a 1, so both inputs to the AND-gate
are 1; hence the output R is 1. This is illustrated by annotating the diagram as shown
below.
0 1
P NOT 1
AND R
1
Q
b. The output of the OR-gate is 1 since one of the input signals, P, is 1. The NOT-gate
changes this 1 into a 0, so the two inputs to the AND-gate are 0 and R = 1. Hence the
output S is 0. The trace is shown below.
1
P 1 0
0 OR NOT
Q
0
1 AND S
R
■
To construct the entire input/output table for a circuit, trace through the circuit to find
the corresponding output signals for each possible combination of input signals.
P
OR R
Q NOT
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
2.4 Application: Digital Logic Circuits 69
Solution List the four possible combinations of input signals, and find the output for each
by tracing through the circuit.
Input Output
P Q R
1 1 1
1 0 1
0 1 0
0 0 1
■
CORBIS
George Boole
(1815–1864)
The Boolean Expression Corresponding to a Circuit
In logic, variables such as p, q and r represent statements, and a statement can have one
Note Strictly speaking, of only two truth values: T (true) or F (false). A statement form is an expression, such as
only meaningful
expressions such as
p ∧ (∼q ∨ r ), composed of statement variables and logical connectives.
(∼p ∧ q) ∨ ( p ∧ r ) and As noted earlier, one of the founders of symbolic logic was the English mathemati-
∼(∼( p ∧ q) ∨ r ) are cian George Boole. In his honor, any variable, such as a statement variable or an input
allowed as Boolean, not signal, that can take one of only two values is called a Boolean variable. An expres-
meaningless ones like sion composed of Boolean variables and the connectives ∼, ∧, and ∨ is called a Boolean
p ∼q((r s ∨ ∧ q ∼. We
use recursion to give a
expression.
careful definition of Given a circuit consisting of combined NOT-, AND-, and OR-gates, a correspond-
Boolean expressions in ing Boolean expression can be obtained by tracing the actions of the gates on the input
Section 5.9. variables.
P P
OR AND
Q AND Q AND
(a) (b)
Solution
a. Trace through the circuit from left to right, indicating the output of each gate symbol-
ically, as shown below.
P P∨Q
OR (P ∨ Q) ∧ ~(P ∧ Q)
Q AND
P∧Q ~(P ∧ Q)
AND NOT
The final expression obtained, (P ∨ Q) ∧ ∼(P ∧ Q), is the expression for exclusive
or: P or Q but not both.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
70 Chapter 2 The Logic of Compound Statements
P P∧Q
AND (P ∧ Q) ∧~R
Q ~R AND
R NOT
■
Observe that the output of the circuit shown in Example 2.4.3(b) is 1 for exactly one
combination of inputs (P = 1, Q = 1, and R = 0) and is 0 for all other combinations of
inputs. For this reason, the circuit can be said to “recognize” one particular combination
of inputs. The output column of the input/output table has a 1 in exactly one row and 0’s
in all other rows.
• Definition
A recognizer is a circuit that outputs a 1 for exactly one particular combination of
input signals and outputs 0’s for all other combinations.
P Q R ( P ∧ Q) ∧ ∼R
1 1 1 0
1 1 0 1
1 0 1 0
1 0 0 0
0 1 1 0
0 1 0 0
0 0 1 0
0 0 0 0
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
2.4 Application: Digital Logic Circuits 71
output coming into the OR-gate. Since one input to the AND-gate is ∼P, draw a line
from P to a NOT-gate and from there to the AND-gate. Since the other input to the
AND-gate is Q, draw a line from Q directly to the AND-gate. The other input to the
OR-gate is ∼Q, so draw a line from Q to a NOT-gate and from the NOT-gate to the
OR-gate. The circuit you obtain is shown below.
P NOT
AND
Q OR
NOT
b. To start constructing this circuit, put one AND-gate at the extreme right for the ∧
between ((P ∧ Q) ∧ (R ∧ S)) and T . To the left of that put the AND-gate corre-
sponding to the ∧ between P ∧ Q and R ∧ S. To the left of that put the AND-gates
corresponding to the ∧’s between P and Q and between R and S. The circuit is shown
in Figure 2.4.4.
P
AND
Q AND
AND
R
AND
S
T
Figure 2.4.4 ■
It follows from Theorem 2.1.1 that all the ways of adding parentheses to
P ∧ Q ∧ R ∧ S ∧ T are logically equivalent. Thus, for example,
Q AND
AND AND
R
S
AND
T
Figure 2.4.5
Each of the circuits in Figures 2.4.4 and 2.4.5 is, therefore, an implementation of
the expression P ∧ Q ∧ R ∧ S ∧ T . Such a circuit is called a multiple-input AND-gate
and is represented by the diagram shown in Figure 2.4.6. Multiple-input OR-gates are
constructed similarly.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
72 Chapter 2 The Logic of Compound Statements
P
Q
R AND
S
T
Figure 2.4.6
Input Output
P Q R S
1 1 1 1
1 1 0 0
1 0 1 1
1 0 0 1
0 1 1 0
0 1 0 0
0 0 1 0
0 0 0 0
Solution First construct a Boolean expression with this table as its truth table. To do this,
identify each row for which the output is 1—in this case, the first, third, and fourth rows.
For each such row, construct an and expression that produces a 1 (or true) for the exact
combination of input values for that row and a 0 (or false) for all other combinations of
input values. For example, the expression for the first row is P ∧ Q ∧ R because
P ∧ Q ∧ R is 1 if P = 1 and Q = 1 and R = 1, and it is 0 for all other values of P, Q,
and R. The expression for the third row is P ∧ ∼Q ∧ R because P ∧ ∼Q ∧ R is 1 if
P = 1 and Q = 0 and R = 1, and it is 0 for all other values of P, Q, and R. Similarly,
the expression for the fourth row is P ∧ ∼Q ∧ ∼R.
Now any Boolean expression with the given table as its truth table has the value 1 in
case P ∧ Q ∧ R = 1, or in case P ∧ ∼Q ∧ R = 1, or in case P ∧ ∼Q ∧ ∼R = 1, and
in no other cases. It follows that a Boolean expression with the given truth table is
(P ∧ Q ∧ R) ∨ (P ∧ ∼Q ∧ R) ∨ (P ∧ ∼Q ∧ ∼R). 2.4.5
The circuit corresponding to this expression has the diagram shown in Figure 2.4.7.
Observe that expression (2.4.5) is a disjunction of terms that are themselves conjunc-
tions in which one of P or ∼P, one of Q or ∼Q, and one of R or ∼R all appear. Such
expressions are said to be in disjunctive normal form or sum-of-products form.
Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.