1 / 27

CSE115: Introduction to Computer Science I

CSE115: Introduction to Computer Science I. Dr. Carl Alphonce 219 Bell Hall alphonce@cse.buffalo.edu. 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. Today’s lessons.

walter
Download Presentation

CSE115: Introduction to Computer Science I

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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

  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…

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

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

  6. Idea

  7. Controlling flow 0

  8. Controlling flow 1

  9. Two in a row? 0

  10. Two in a row? 0

  11. Two in a row? 0

  12. Two in a row? 1

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

  14. Truth table for AND

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

  16. Truth table for OR

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

  18. Truth table for NOT

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

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

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

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

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

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

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

  26. Setting the flip-flopBecause 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! R (reset) = 0 1 0 remembered value 0 Resetting the flip-flopResetting the remembered value to zero is similar, except we raise, then lower, the value on R. 1 1 0 S (set) = 0

  27. Questions?

More Related