Experiment 3
Experiment 3
3.1 Motivation
In industry, cost is typically the controlling factor in the design and production of goods. In producing digital circuits, even though it may seem that the purchasing department is responsible for reducing costs by finding the cheapest supplier, engineers designing digital circuits have several methods at their disposal for reducing the cost of the design. In general, the fewer and less expensive the parts required to build a circuit, the less it will cost. Therefore, an important goal in circuit design is minimizing the hardware required and the associated cost of that hardware. In hapter !"s lab, simple guidelines were introduced for converting an #$% or %$# expression into a logic diagram. &or example, consider the following #$% expression:
F=AB +
'(.)*
Implementing this circuit would require two A+, gates and one $- gate. The TT. chips required are the /012 'four A+,s* and the /0(! 'four $-s*. Implementing the preceding expression would use 3ust two of the four A+, gates and 3ust one of the four $- gates. In production, this 4ind of inefficiency would be very costly. To get around this inefficiency, it is common practice to implement an expression using only one type of gate typically a +A+, or +$- gate. The +A+, gate is the most 5naturally5 implemented function at the internal level of the chip. This quality results in the +A+, gate being the fastest and least expensive of the TT. chips. In addition, both the +A+, and the +$- gate can act as inverters, thus eliminating the need for separate inverter chips. 6ow can an expression in terms of A+,s and $-s be realized using only +A+, or +$- gates7 There are two primary methods for accomplishing this. &irst, using boolean algebra, the original expression can be manipulated into an equivalent expression using the gate type desired. This method can become extremely complicated, especially when dealing with complex expressions. A second method uses gate equivalency rules that let any gate perform the A+, and $- functions.
&: AB
Thus in implementing an expression using only +A+, gates, the goal is to reduce all logical operations to the form above;that of a +A+, gate. &rom our original expression: F=AB + CD ,ouble bar and apply ,e <organ"s theorem to ma4e all operations in the A+, form:
&:
AB
C D C D
). ' AB * !. 'C D * 3. ( XY ) where > : ( A B ) and Y ='C D * Thus the expression can be realized using three +A+, gates as illustrated in &igure (.). ?hat if there were a surplus of +$- gates on hand@ how could 9quation (.) be implemented using +$- gates7 &ollowing the same procedure used with the +A+, gate, we recall the function of the +$- gate on two inputs, A and B, is illustrated in boolean algebra as:
&: A + B
Therefore, to implement an expression using only +$- gates, all logical operations must be reduced to the preceding form that of a +$- gate. &rom the original expression:
F = A B +C D
F = A B +C D
F = A B +C D
,ouble bar and apply ,e <organ"s theorem to ma4e all logical operations in the $- form. & : A B +C D
F =' A B *'C D *
& : ' AB * = ' CD * & : ' A + B * = ' C +D * 9xamining this expression, we find two +$- forms: ). !. ' A +B * ' C +D *
The final logical operation between ')* and '!* is the $- function. If a +$- gate is used to perform the $- operation, the final output will be inverted. Therefore an inverter must be placed at the output of this final +$- gate to properly generate &. +ote the use of the +$- gate as an inverter in the logic diagram in &igure (.!. Again the goal is using each gate on each chip.
The possible complexity of using algebraic manipulation is obvious. ?ith this complexity comes a high probability for error. 8ecause of these problems, we study another method for realizing an expression in 3ust one gate type using gateAequivalency rules.
Figure 3.3 Invert Function with A ! an( O% The +A+, function is expressed as: F = AB This equation can be reduced to the A+, function by complementing the entire equation 'i.e., the output* to remove the +$T bar. Thus a +A+, gate will perform the A+, function if the output is inverted. The +$function on two inputs is illustrated as: F : A +B 8y applying ,e <organ"s theorem, we obtain an equivalent expression: &: A B This can be reduced to the A+, function by complementing the input variables. Thus a +$- gate will perform the A+, function if the inputs are inverted. In summary, a +A+, gate will perform the A+, function if the output is inverted. A +$- gate will perform the A+, function if the inputs are inverted.
&: AB
8y applying ,e <organ"s theorem we obtain an equivalent expression:
&: A = B
This can be reduced to the $- function by complementing the input variables. Thus a +A+, gate performs the $- function if the input variables are complemented. The +$- function on two inputs is illustrated as:
F = A +B
This can be reduced to the $- function by complementing the entire equation 'i.e., the output* to remove the +$T bar. Thus a +$- gate performs the $- function if the output is complemented.
In summary, a +A+, gate will perform the $- function if the inputs are inverted. A +$- gate will perform the $- function if the output is inverted. 3.3.) *ymbolic !e"inition&
To clarify this dual nature of gates, each can be represented symbolically in two forms. #hown in &igure (.0 and &igure (.B are two representations of a +A+, gate and two representations of a +$- gate respectively. The intended function 'A+, or $-* is represented by the basic shape of the symbol. Input or output requirements are dictated by the presence of circles at the inputs or outputs. In direct correlation with the summaries presented in #ections (.(.! and (.(.( we note that the presence of a circle at an input indicates that the input must be inverted to properly perform the function dictated by the symbol shape, that is, the A+, or $- function. Also, the presence of a circle at an output indicates that the output must be inverted to properly perform the function dictated by the symbol shape, that is, the A+, or $- function. It is important to note that these symbols do not represent new gates, 3ust two ways of viewing the +A+, and +$- gates. Thus we can spea4 of the AND form of a +A+, gate and the OR form of a +A+, gate. .i4ewise we can spea4 of the AND form of a +$- gate and the OR form of a +$- gate.
This diagram is easily converted to use 3ust +A+, gates by first replacing all $- gates with the $form of the +A+, gate and replacing all A+, gates with the A+, form of the +A+, gate, as in &igure (./. ,o not draw interconnections yet.
F = A B +C D
#ince we deal with active high inputs and outputs in the 5real5 world, the initial inputs and final outputs of a circuit should generally be active high. .oo4ing at &igure (./ we see that this condition is already satisfied. The next step is connection of the A+, forms to the $- form. #ince the $- form of the +A+, gate requires active low inputs and the output of the A+, form is already active low, no level conversion is needed, and a direct connection can be made between the outputs of the A+, forms and the inputs of the $- form. In general, a direct connection can be made between an active low output and input or between an active high output and input. If one is active high and the other is active low, then an inverter must be inserted to convert from one level to the other. <a4ing connections as 3ust described, the final logic diagram using only +A+, gates is illustrated in &igure (.2. ?hen the A+, and $- forms of the +A+, gates on the logic diagram are shown, the intended function of the circuit is more obvious. .oo4ing at &igure (.2, we can readily see it is a #$% implementation;a series of A+,s feeding an $-;while loo4ing at the equivalent circuit in &igure (.), we find that the actual function of the circuit is not clear. A second example will illustrate a condition where level conversion is necessary. onsider implementing a threeAinput $- gate using only twoAinput +A+, gates. If
F = A B +C D
F = A+ B+C
Figure 3.3 Three0Input O% with Two0Input Gate&
twoAinput $- gates were available, this function could be implemented as shown in &igure (.F. To implement using only twoAinput +A+, gates we proceed as before replacing all $- gates with the $- form of the +A+, gate. This yields &igure (.)1. To complete the diagram we must first insure active high inputs and outputs to the real world. #ince the inputs of the $- forms are active low, we must invert the input
variables. #ince we are assuming doubleArail inputs, input inverters are not shown in &igure (.)). The final output of the circuit is already active high@ so no conversion is needed there. The final connection is that between the first and second $- form. #ince the output of the first $- form is active high and the input of the second $form is active low, a direct connection cannot be made. To match the levels, a +A+, gate used as an inverter is inserted. #ince the inverter is converting from active high to active low, we show the A+, form of the +A+, gate as an inverter since it has active high inputs and an active low input.
F = A+ B+C
Figure 3.11 Two0Input A ! Implementation o" Three0Input O%
F = A B +C D
-ab #5erci&e Objective This lab allows the student to apply concepts from hapter ( to implement a networ4 that he or she must design. &irst, given a description of the digital networ4 desired, the student must define in truth table, #$% and %$# form, the function of this networ4. &rom these definitions, the topics covered in hapter ( are used to implement the #$% and %$# expressions using A ! gates only.
'roce(ure 1. ,esign and build an even parity generator for a (Abit word. This circuit will have three inputs 'the ( bits of the word* and one output. This output should be ) if there is an odd number of 1& in the input word@ otherwise, the output should be 1 'if there is an even number of )s in the input word*. %roduce a design using gate equivalency rules containing: 6a7 A truth table defining the function as previously described. 6b7 An #$% equation for the truth table. 6c7 A %$# equation for the truth table. 6(7 A logic diagram to implement the #$% equation using +A+, gates only. '#how A+, and $- forms.* 6e7 A logic diagram to implement the %$# equation using +A+, gates only. '#how A+, and $- forms.* ?ire 6(7 and 6e7 and verify their operation. 6ave the lab instructor inspect your wor4 after each circuit is wor4ing.