Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.

Similar presentations


Presentation on theme: "CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1."— Presentation transcript:

1 CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall alphonce@cse.buffalo.edu 1

2 Announcements If this is your first class: –print a syllabus from the course website –hand in signature form next class Recitations start this week Cell phones off 2

3 Today’s lessons A computer is a very simple machine. A computer manipulates voltages Gates are used to control voltage flow Circuits are combinations of gates A flip-flop is a circuit that remembers But first… 3

4 Name sign competition Put your signs out! 9:00 AM – Jeff 1:00 PM – Nina 3:00 PM – Alicia 4

5 physical vs. logical perspectives Physical reality: Logical view: WIRE Carries a HIGH voltage or a LOW voltage WIRE Carries a 1 or a 0 5

6 Idea 6

7 Controlling flow 0 7

8 1 8

9 Two in a row? 0 9

10 0 10

11 Two in a row? 0 11

12 Two in a row? 1 12

13 AND gate For which input values is output 1? For which input values is output 0? inputs are on left output is on right 13 0 or 1

14 Truth table for AND Input 1Input 2Output 000 010 100 111 14

15 OR gate For which input values is output 1? For which input values is output 0? inputs are on left output is on right 15

16 Truth table for OR Input 1Input 2Output 000 011 101 111 16

17 NOT gate For which input value is output 1? For which input value is output 0? input is on left output is on right 17

18 Truth table for NOT InputOutput 01 10 18

19 Flip-flop (a bit of memory!) S (set) R (reset) remembered value 19

20 Setting the flip-flop The normal value of R and S is zero. S (set) = 0 R (reset) = 0 remembered value 20

21 Setting the flip-flop To store 1 in the flip-flop, we “raise” S to 1… S (set) = 1 R (reset) = 0 remembered value 21

22 Setting the flip-flop …which makes the output of the OR gate 1. S (set) = 1 R (reset) = 0 remembered value 22 1

23 Setting the flip-flop The NOT gate inverts this 1 value to 0, which becomes the second input to the upper OR gate. S (set) = 1 R (reset) = 0 remembered value 23 10 0

24 Setting the flip-flop Since both inputs of the upper OR gate are zero, its output is zero. S (set) = 1 R (reset) = 0 remembered value 24 1 0 0 0

25 Setting the flip-flop The NOT gate inverts this 0 to a 1; this value becomes the second input to the bottom OR. S (set) = 1 R (reset) = 0 remembered value 25 1 0 0 0 1 1

26 Setting the flip-flop Because the output of the bottom OR gate will now stay at 1, we can lower S to zero, and the circuit will stay in a stable state, with 1 as the remembered value! 26 Resetting the flip-flop Resetting the remembered value to zero is similar, except we raise, then lower, the value on R. S (set) = 0 R (reset) = 0 remembered value 1 0 0 0 1 1

27 Questions? 27


Download ppt "CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1."

Similar presentations


Ads by Google