Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSIS-110 Introduction to Computer Science

Similar presentations


Presentation on theme: "CSIS-110 Introduction to Computer Science"— Presentation transcript:

1 CSIS-110 Introduction to Computer Science
Dr. Meg Fryling “Dr. Meg” Fall 2012 @SienaDrMeg #csis110

2 Lecture Nine Agenda Questions? Assignments
CSI Chapter 5 - Gates and Circuits Homework 2 – Part I Lab 4

3 Assignments Readings: See course scheduled on syllabus Homework 2
The textbook readings are going to help you with homeworks AND labs Homework 2 Due Wednesday, October 10th at BEGINNING of class Coming to class late does NOT extend your due date/time Lab 3 Due at START of lab 4 Coming to lab late does NOT extend your due date/time

4 What do I like about this?

5 Chapter 5 Gates and Circuits

6 DeMorgan's Law 9/26/12 Worksheet - Question 1c
Misspoke when I said (B OR C)' is the same as (B' OR C'). NOT TRUE! If you try a few examples you'll see it doesn't work! Should have said (B OR C)' is the same as (B' AND C'). This is known as DeMorgan's Law. It is also true that (B AND C)' is the same as (B' OR C')! See last slide from Wednesday’s lecture on properties of Boolean algebra. So the answer for 1c is (A’ AND B) OR (B OR C)’ (A’ AND B) OR (B’ AND C’) DeMorgan's Law I misspoke in class today when I said (B OR C)' is the same as (B' OR C'). If you try a few examples you'll see it doesn't work! I should have said (B OR C)' is the same as (B' AND C'). This is known as DeMorgan's Law. It is also true that (B AND C)' is the same as (B' OR C')! See last slide from today's lecture on properties of Boolean algebra.

7 Gates with More Inputs Gates can be designed to accept three or more input values A three-input AND gate, for example, produces an output of 1 only if all input values are 1 Figure 4.7 Various representations of a three-input AND gate

8 Constructing Gates Transistor is a device that acts either as a wire that conducts electricity or as a resistor that blocks the flow of electricity, depending on the voltage level of an input signal – It’s a switch!! It is made of a semiconductor material, which is neither a particularly good conductor of electricity, such as copper, nor a particularly good insulator, such as rubber

9 Circuits Combinational circuit
The input values explicitly determine the output Sequential circuit The output is a function of the input values and the existing state of the circuit We describe the circuit operations using Boolean expressions Logic diagrams Truth tables Are you surprised?

10 Example 1 Consider the circuit diagram below:
What is the corresponding Boolean expression? Homework 2: Part I – A

11 Example 1 - Truth Table Boolean Expression: (AB) + (A + B)
What is the corresponding truth table? A B AB A+B (AB)+(A+B)

12 Example 1 - Truth Table Boolean Expression: (AB) + (A + B) A B AB A+B
1

13 Combinational Circuits
Gates are combined into circuits by using the output of one gate as the input for another What is the Boolean expression for this circuit? What is the truth table for this circuit? (AB + AC ) Question 7

14 Truth Table Boolean expression is (AB + AC) A B C AB AC AB+AC

15 Combinational Circuits
Three inputs require eight rows to describe all possible input combinations (2n, where n is the number of inputs) This same circuit using a Boolean expression is (AB + AC)

16 Example 2 Consider the following Boolean expression:
A’B+(B+C)’ Draw a circuit diagram CSI – Chapter 5, Exercise 57 Homework 2: Part I – A

17 Example 2 - Circuit

18 Example 2 - Truth Table Boolean expression: A’B+(B+C)’
Draw the corresponding truth table A B C A’ A’B (B+C) (B+C)’ A’B+(B+C)’ 1

19 Example 2 - Truth Table A B C A’ A’B (B+C) (B+C)’ A’B+(B+C)’ 1

20 Now let’s go the other way
Consider the following Boolean expression: A(B + C) What does the circuit look like? What does the truth table look like? Question 8

21 Circuit A(B + C)

22 Truth Table Boolean expression is (AB + AC) A B C B+C A(B+C)

23 Truth Table Compare this truth table with the previous question.
Compare this truth table with the previous question. Notice anything?

24 Wow, it produces the same results!
… do they both behave the same way? … if so, which is better?

25 Combinational Circuits
We have therefore just demonstrated circuit equivalence That is, both circuits produce the exact same output for each input value combination Boolean algebra allows us to apply provable mathematical principles to help us design logical circuits A(B + C) = AB + BC (distributive law) so circuits must be equivalent

26 Properties of Boolean Algebra

27 Truth Table -> Circuit Design
Sum-of-Products Algorithm Step 1. Start with a truth table Step 2. Identify rows with a 1 output, and make a product (AND) of the input variables Step 3. Negate each variable that is zero in its row Step 4: Create the Boolean expression by creating their sum (OR) Step 5. Produce the circuit diagram! Homework 2: Part I – D & E Homework 2: Part I – D & E

28 Sum-of-Products Algorithm
Step 1. Start with a truth table Step 2. Identify rows with a 1 output, and make a product (AND) of the input variables A B output 1

29 Sum-of-Products Algorithm
Step 3. Negate each variable that is zero in its row A B output 1 AB

30 Sum-of-Products Algorithm
Step 4: Create the Boolean expression by creating their sum (OR) A B output 1 A’B’ A’B AB

31 Sum-of-Products Algorithm
A’B’ + A’B + AB Step 5. Produce the corresponding circuit diagram!


Download ppt "CSIS-110 Introduction to Computer Science"

Similar presentations


Ads by Google