SECTION 2.4 Application: Digital Logic Circuits Copyright © Cengage Learning. All rights reserved. Application: Digital Logic Circuits Switches “in series” Switches “in parallel” Change closed and on are replaced by T, open and off are replaced by F? Application: Digital Logic Circuits • More complicated circuits correspond to more complicated logical expressions. • This correspondence has been used extensively in design and study of circuits. • Electrical engineers use language of logic when refer to values of signals produced by an electronic switch as being “true” or “false.” • Only that symbols 1 and 0 are used • symbols 0 and 1 are called bits, short for binary digits. • This terminology was introduced in 1946 by the statistician John Tukey. Black Boxes and Gates Black Boxes and Gates • Circuits: transform combinations of signal bits (1’s and 0’s) into other combinations of signal bits (1’s and 0’s). • Computer engineers and digital system designers treat basic circuits as black boxes. • Ignore inside of a black box (detailed implementation of circuit) • focused on the relation between the input and the output signals. • Operation of a black box is completely specified by constructing an input/output table that lists all its possible input signals together with their corresponding output signals. Black Boxes and Gates One possible correspondence of input to output signals is as follows: An Input/Output Table Black Boxes and Gates An efficient method for designing more complicated circuits is to build them by connecting less complicated black box circuits. Gates can be combined into circuits in a variety of ways. If the rules shown on the next page are obeyed, the result is a combinational circuit, one whose output at any time is determined entirely by its input at that time without regard to previous inputs. Black Boxes and Gates • A NOT-gate (or inverter) is a circuit with one input signal and one output signal. If the input signal is 1, the output signal is 0. Conversely, if the input signal is 0, then the output signal is 1. Black Boxes and Gates • An AND-gate is a circuit with two input signals and one output signal. If both input signals are 1, then the output signal is 1.Otherwise, the output signal is 0. • An OR-gate also has two input signals and one output signal. If both input signals are 0, then the output signal is 0. Otherwise, the output signal is 1. Figure 2.4.3 (continued) The Input/Output Table for a Circuit Determining Output for a Given Input Indicate the output of the circuits shown below for the given input signals. a. b. If you are given a set of input signals for a circuit, you can find its output by tracing through the circuit gate by gate. Example 1(a) – Solution 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. Example 1(b) – Solution cont’d 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. Circuit => Boolean Expression Boolean Expression Corresponding to a Circuit In logic, variables such as p, q and r represent statements, and a statement can have one of only two truth values: T(true) or F(false). A statement form is an expression, such as p ∧ (∼q ∨ r), composed of statement variables and logical connectives. In honor of English mathematician George Boole: • any variable, such as a statement variable or an input signal, that can take one of only two values is called a Boolean variable. • An expression composed of Boolean variables and connectives ∼, ∧, and ∨ is called a Boolean expression. Finding a Boolean Expression for a Circuit Find Boolean expressions that correspond to circuits shown below. A dot indicates a soldering of two wires; wires that cross without a dot are assumed not to touch. Trace through the circuit from left (input) to right (output), indicating output of each gate symbolically… Solution Trace through the circuit from left to right, indicating the output of each gate symbolically, as shown below. The final expression obtained, (P ∨ Q) ∧ ∼(P ∧ Q), is the expression for exclusive or: P or Q but not both. Finding a Boolean Expression for a Circuit (your turn) Find Boolean expressions that correspond to circuits shown below. A dot indicates a soldering of two wires; wires that cross without a dot are assumed not to touch. Trace through the circuit from left to right, indicating the output of each gate symbolically, Example 3(b) – Solution cont’d The Boolean expression corresponding to the circuit is (P ∧ Q) ∧ ∼R, as shown below. Observe the output is 1 for exactly one combination of inputs (P = 1, Q = 1, and R = 0) and is 0 for all other combinations of inputs. The Boolean Expression Corresponding to a Circuit This circuit can be said to “recognize” one particular combination of inputs. Input/Output Table for a Recognizer Boolean Expression ==> Circuit Constructing Circuits for Boolean Expressions Construct circuits for following Boolean expressions. (∼P ∧ Q) ∨ ∼Q Solution (from right to left) Write input variables in a column on left side of diagram. Then go from right side of the diagram to the left, working from outermost part of the expression to the innermost part. Solution cont’d Constructing Circuits for Boolean Expressions Construct circuits for following Boolean expressions. ((P ∧ Q) ∧ (R ∧ S)) ∧ T Constructing Circuits for Boolean Expressions Construct circuits for following Boolean expressions. ((P ∧ Q) ∧ (R ∧ S)) ∧ T The Circuit Corresponding to a Boolean Expression It follows from Theorem 2.1.1 that all the ways of adding parentheses to P ∧ Q ∧ R ∧ S ∧ T are logically equivalent. The Circuit Corresponding to a Boolean Expression Thus, for example, ((P ∧ Q) ∧ (R ∧ S)) ∧ T ≡ (P ∧ (Q ∧ R)) ∧ (S ∧ T). It also follows that the circuit in Figure 2.4.5, which corresponds to (P ∧ (Q ∧ R)) ∧ (S ∧ T), has the same input/ output table as the circuit in Figure 2.4.4, which corresponds to ((P ∧ Q) ∧ (R ∧ S)) ∧ T. Figure 2.4.5 Figure 2.4.4 The Circuit Corresponding to a Boolean Expression 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. Figure 2.4.6 Multiple-input OR-gates are constructed similarly. a Given Input/Output Table ==> Circuit Designing a Circuit for a Given Input/Output Table Design a circuit for the following input/output table: Example 5 – Solution First construct a Boolean expression with this table as its truth table. • 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 recognize that combination. • It follows that one Boolean expression with the given truth table is (P ∧ Q ∧ R) ∨ (P ∧ ∼Q ∧ R) ∨ (P ∧ ∼Q ∧ ∼R). Example 5 – Solution cont’d The circuit corresponding to this expression has the diagram shown in Figure 2.4.7. Figure 2.4.7 Example 5 – Solution cont’d Observe that expression (P ∧ Q ∧ R) ∨ (P ∧ ∼Q ∧ R) ∨ (P ∧ ∼Q ∧ ∼R). 2.4.5 is a disjunction of terms that are themselves conjunctions 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. Simplifying Combinational Circuits Simplifying Combinational Circuits Consider the two combinational circuits shown in Figure 2.4.8. (a) (b) Figure 2.4.8 Simplifying Combinational Circuits Trace through following circuit, you will find that its input/ output table is which is the same as the input/output table for following circuit the two circuits do same job in the sense that they transform combinations of input signals into same output signals. Simplifying Combinational Circuits Yet circuit (b) is simpler than circuit (a) in that it contains many fewer logic gates. Thus, as part of an integrated circuit, it would take less space and require less power. Showing Two Circuits Are Equivalent Find the Boolean expressions for each circuit below. Use Theorem 2.1.1 (logical equivalence) to show that these expressions are logically equivalent. Example 6 – Showing That Two Circuits Are Equivalent cont’d Example 6 – Solution The Boolean expressions that correspond to circuits (a) and (b) are ((P ∧ ∼Q) ∨ (P ∧ Q)) ∧ Q and P ∧ Q, respectively. By Theorem 2.1.1, Example 6 – Solution cont’d It follows that the truth tables for ((P ∧ ∼Q) ∨ (P ∧ Q)) ∧ Q and P ∧ Q are the same. Hence the input/output tables for the circuits corresponding to these expressions are also the same, and so the circuits are equivalent. NAND and NOR Gates NAND and NOR Gates Another way to simplify a circuit is to use different gates: • A NAND-gate is a single gate that acts like an AND-gate followed by a NOT-gate. The logical symbol is |, called a Sheffer stroke (after H. M. Sheffer, 1882–1964) • A NOR-gate acts like an OR-gate followed by a NOT-gate.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages122 Page
-
File Size-