Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science 101 Circuit Design Algorithm. Circuit Design - The Problem The problem is to design a circuit that accomplishes a specified task. The.

Similar presentations


Presentation on theme: "Computer Science 101 Circuit Design Algorithm. Circuit Design - The Problem The problem is to design a circuit that accomplishes a specified task. The."— Presentation transcript:

1 Computer Science 101 Circuit Design Algorithm

2 Circuit Design - The Problem The problem is to design a circuit that accomplishes a specified task. The problem is to design a circuit that accomplishes a specified task. What does this mean? What does this mean? What kind of task? What kind of task? We would like to specify We would like to specify The number of inputs to the circuit.The number of inputs to the circuit. The number of outputs.The number of outputs. What value each output should have for each setting of the inputs.What value each output should have for each setting of the inputs.

3 Circuit Design - Observations We can deal with one output at a time. We can deal with one output at a time. The truth table is a good way to organize the specifications. The truth table is a good way to organize the specifications. If we can come up with a Boolean expression for the output, we’re home free. If we can come up with a Boolean expression for the output, we’re home free.

4 Circuit Design and Truth Table The problem reduces to this: The problem reduces to this: Given a truth table with all values for inputs. Given a truth table with all values for inputs. And given a column of values for the output. And given a column of values for the output. Find a Boolean expression that yields the specified column. Find a Boolean expression that yields the specified column. If we can do this, we can get the circuit from the Boolean expression. If we can do this, we can get the circuit from the Boolean expression. We now develop an algorithm, the Sum of Products algorithm, to find the expression. We now develop an algorithm, the Sum of Products algorithm, to find the expression.

5 Circuit Design - Typical Problem Find Boolean expression for the output. Find Boolean expression for the output. Note that this is a “Majority Rules” circuit. Note that this is a “Majority Rules” circuit. The output reflects the majority input. The output reflects the majority input.

6 Circuit Design - First Case Consider case where output column has only one 1. Consider case where output column has only one 1. Want expression which is true when Want expression which is true when A is false _ (A true) and B is true and C is true _ ABC does the trick. _ ABC does the trick.

7 Sum of Products Algorithm- Single 1 Note row in which the 1 occurs. Note row in which the 1 occurs. Make a product of all the input variables. Make a product of all the input variables. Put a bar over each variable that has a value of 0 in this row. Put a bar over each variable that has a value of 0 in this row.

8 Sum of Products - Single 1 Note row where the 1 occurs. Note row where the 1 occurs. Make product of all variables. ABC Make product of all variables. ABC Put bar over variables with 0 value. _ ABC Put bar over variables with 0 value. _ ABC

9 Sum of Products - General Case Want BE that is true if Want BE that is true if _ ABC is true OR _ ABC is true _ _ _ ABC+ABC+ABC _ _ _ ABC+ABC+ABC

10 Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output that has a 1. For each such row For each such row Make a product of all the input variables. Make a product of all the input variables. Put bar over each variable with a 0 in this row. Put bar over each variable with a 0 in this row. Make a sum of all of these product terms. Make a sum of all of these product terms.

11 Sum of Products - Example Problem: Design a logic circuit with Problem: Design a logic circuit with 3 input lines, 1 output line 3 input lines, 1 output line Anytime we change the value of any one of the inputs, the output value changes. Anytime we change the value of any one of the inputs, the output value changes. Think of a single light bulb controlled by three light switches that work independently. Think of a single light bulb controlled by three light switches that work independently. Note: Once we set the output for one set of inputs, the rest is determined. Note: Once we set the output for one set of inputs, the rest is determined. We’ll start with all inputs 0 giving output 0. We’ll start with all inputs 0 giving output 0.

12 Example continued 1’s in output give _ _ _ _ ABC + ABC _ _ + ABC + ABC 1’s in output give _ _ _ _ ABC + ABC _ _ + ABC + ABC

13 Circuit for the example A B Boolean Expression _ _ _ _ _ _ ABC+ABC+ABC+ABC C

14


Download ppt "Computer Science 101 Circuit Design Algorithm. Circuit Design - The Problem The problem is to design a circuit that accomplishes a specified task. The."

Similar presentations


Ads by Google