Upcoming SlideShare
×

# N301 Designing Circuits

1,797 views

Published on

Published in: Technology, Business
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

Views
Total views
1,797
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
25
0
Likes
0
Embeds 0
No embeds

No notes for slide

### N301 Designing Circuits

1. 1. Designing Circuits
2. 2. Goals <ul><li>By the end of this lecture, you should understand … </li></ul><ul><li>How to use the Sum-Of-Products to construct circuits. </li></ul><ul><li>How to construct a basic, binary input circuit. </li></ul><ul><li>How to construct more complex circuits, using three or more inputs. </li></ul>
3. 3. Where We’ve Been <ul><li>We are developing an increasingly complex model of computer operation. </li></ul><ul><li>We began with the switch and saw how we can use it encode information in digitized form. </li></ul><ul><li>We combined switches into gates and saw how we can use Boolean logic process binary information. </li></ul>
4. 4. Where We’re Going <ul><li>We will learn how to combine gates to form circuits. </li></ul><ul><li>We are looking at a special kind of circuit – a combinational circuit – although from here on out we simply refer to circuit. </li></ul>
5. 5. What is a Circuit? <ul><li>A circuit is a combination of logic gates that changes a set of binary inputs into a set of binary outputs in which the values of the outputs depend only on the electrical current (high/low voltage) values of the inputs. </li></ul><ul><li>By the way, there are also circuits that depend also on the previous values of the inputs, but we won’t consider them in this class. </li></ul>
6. 6. Circuit Analysis <ul><li>Circuits depend on Boolean logic, which we introduced last lecture. </li></ul><ul><li>Boolean notation allows us to create logical expressions using Boolean operators. </li></ul><ul><li>For example: </li></ul>Q = ~ ((A + B) • (~B)) Q = NOT ((A OR B) AND (NOT B)) Q = (A + B) Q = (A OR B) Using Symbols Using Operator Names Examples of Boolean Expressions
7. 7. Circuits & Boolean Expressions <ul><li>You can express every Boolean expression using a circuit diagram. </li></ul><ul><li>Conversely, you can represent every circuit diagram as a Boolean expression. </li></ul><ul><li>Of course, we aren’t going after just any circuits here…. we want to develop the skills to construct and analyze circuits that can perform the logic and arithmetic calculations that a computer requires to operate. </li></ul>
8. 8. Constructing Circuits <ul><li>We can use any one of several algorithms for constructing circuits, just like there were several different algorithms for modeling gates. </li></ul><ul><li>We will use an algorithm called the sum-of-products algorithm to design our circuits. When using the sum-of-products algorithm, we move in a step-by-step process to build a circuit. </li></ul>
9. 9. The Four Steps for the Sum-Of-Products Algorithm <ul><li>From a problem statement, construct a truth table that describes what the voltage output should be under each possible combination of voltage inputs. </li></ul><ul><li>From the truth table, identify those gate combinations that produce positive voltage output, and write sub expressions for those conditions. </li></ul><ul><li>Combine the sub expressions (a.k.a. “Boolean terms”) into a single Boolean expression. </li></ul><ul><li>Draw a circuit diagram that corresponds to the Boolean expression. </li></ul>
10. 10. Sub-of-Products Example <ul><li>Problem Statement: “Design a circuit that has two inputs (A, B) and one output, Q. Q = 1 iff * both a and b are the same voltage.” * - iff = “If and only if” </li></ul>
11. 11. Sub-of-Products Example <ul><li>How to read the problem: </li></ul><ul><ul><li>We two input lines coming into a circuit. One input line is labeled A and the other input line is labeled B. </li></ul></ul><ul><ul><li>There is one output line, labeled Q. </li></ul></ul><ul><ul><li>The output voltage on Q is high if and only if both B and B have high voltage, or both A and B have low voltage (A and B have the same voltage). </li></ul></ul><ul><ul><li>By inference, when A is high and B is low, or when A is low and B is high, the output line Q is low. </li></ul></ul>
12. 12. Sub-of-Products Example: Step 1 <ul><li>STEP 1: Construct a truth table to illustrate the problem statement: </li></ul>1 1 0 1 1 0 0 0 Q B A OUTPUT INPUTS
13. 13. Sub-of-Products Example: Step 2a <ul><li>STEP 2a: Scan the table to determine when the Output column is TRUE. Identify those instances: </li></ul>1 1 1 0 0 1 0 1 0 1 0 0 Q B A OUTPUT INPUTS
14. 14. Sum-of-Products Example: Step 2b <ul><li>From the table we can identify 2 instances of high output: </li></ul><ul><ul><li>Where both A and B were 0 </li></ul></ul><ul><ul><li>Where both A and B were 1 </li></ul></ul><ul><li>Now let’s create Boolean sub expressions for each instance (STEP 2b): </li></ul><ul><ul><li>~A • ~B (NOT A AND NOT B) </li></ul></ul><ul><ul><li>A • B (A AND B) </li></ul></ul>
15. 15. Sum-of-Products Example: Step 3 <ul><li>STEP THREE: Combine the Boolean sub-expressions (or terms) into an overall expression. </li></ul><ul><li>In our example, we are building an OR statement. We are saying Q can be high with one set of input conditions (~A • ~B) , or using a second set of input conditions (A • B). </li></ul><ul><li>Therefore, our expression will be connected with the OR operator. There are two terms – one for each high voltage output. </li></ul><ul><li>Our single Boolean Expression is: Q = (~A • ~B) + (A • B) </li></ul>
16. 16. Sum-of-Products Example: Step 4 <ul><li>STEP FOUR: Build the circuit to represent our Boolean Expression. </li></ul>Q A B
17. 17. Where We Were Limited <ul><li>The example we looked at took 2 inputs. But, of course, circuits are not limited to just two inputs. </li></ul><ul><li>We can extend our process to include n inputs. </li></ul><ul><li>Consider the following overall remarks regarding how we extend our model to build more complex circuits … </li></ul>
18. 18. General Rules/Guidelines <ul><li>When you add additional input lines, it becomes possible to see some general patterns… </li></ul><ul><li>In the step from problem statement to truth table, remember this: </li></ul><ul><ul><li>A problem with n input lines will produce a truth table with 2 n elements (or rows)… for example, 2 inputs lines result in 4 possible voltage combinations , while 3 input lines result in 8 possible combinations . </li></ul></ul><ul><li>In the step from truth table to circuit drawing, remember this: </li></ul><ul><ul><li>We can combine various high sub-conditions joined by an OR using an AND gate. To better manage the spacing required to include the or gates and input lines, experienced students sometimes draw their circuits from right to left. </li></ul></ul>
19. 19. Let’s Do One! <ul><li>Consider the following problem statement. Analyze it using the 4 step, Sum of Products Algorithm to produce a circuit. </li></ul><ul><li>Problem Statement: “Design a circuit that takes 3 inputs, and outputs a high value IFF exactly two of the inputs are high.” </li></ul>
20. 20. Problem Solution <ul><li>Step One: Create truth table </li></ul>1 1 1 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 Q C B A OUTPUTS INPUTS
21. 21. Problem Solution <ul><li>Step One: Create truth table </li></ul>1 1 1 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 Q C B A OUTPUTS INPUTS
22. 22. Problem Solution <ul><li>Step Two: Scan the table to determine when the Output column is TRUE. Identify those instances: </li></ul>0 1 1 1 1 0 1 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 Q C B A OUTPUTS INPUTS
23. 23. Problem Solution <ul><li>Step Three: Create Boolean expression </li></ul><ul><li>Q = (~A * B * C) + </li></ul><ul><li>(A * ~B * C) + </li></ul><ul><li>(A * B * ~C) </li></ul>
24. 24. Problem Solution: Step 4 <ul><li>STEP FOUR: Build the circuit to represent our Boolean Expression. </li></ul>Click Button for the xLogicCircuits Applet
25. 25. Simplifying Boolean Expressions <ul><li>When you look at complicated input combinations which result in Boolean expressions with many terms, you can save a lot of time by using some simplification rules. These rules allow you to reduce and combine terms. </li></ul><ul><li>You can find a summary of these simple Boolean rules on the next slide … </li></ul>
26. 26. Boolean Axioms <ul><li>TRUE * P = P </li></ul><ul><li>FALSE * P = FALSE </li></ul><ul><li>FALSE + P = P </li></ul><ul><li>TRUE + P = TRUE </li></ul><ul><li>P + Q = Q + P </li></ul><ul><li>P * Q = Q * P </li></ul><ul><li>(P + Q) +R = P + (Q + R) </li></ul><ul><li>(P * R) * Q = P * (R * Q) </li></ul><ul><li>P * ~P = FALSE </li></ul><ul><li>P + P = P </li></ul><ul><li>P * P = P </li></ul>
27. 27. De Morgan’s Laws <ul><li>In addition to the preceding axioms, a mathematician named de Morgan first provided proof of the following laws: </li></ul><ul><ul><li>~(P * Q) = ~P + ~Q </li></ul></ul><ul><ul><li>~(P + Q)= ~P * ~Q </li></ul></ul><ul><li>In your next lab assignment, you will confirm de Morgan’s Laws. You can easily do the lab by constructing a truth table with inputs for P, Q, P*Q, ~(P*Q), ~P, ~Q, and ~P+~Q. </li></ul>
28. 28. Where We Are Going <ul><li>Now that you have some understanding of how to build a general circuit, we will look at some specific ones. </li></ul><ul><li>Next time, we’ll consider circuits that play particularly important roles in computer operation: adders and Arithmetic Logic Unit processing. </li></ul>
29. 29. Questions?