1 / 15

CSE115 / CSE503 Introduction to Computer Science I

CSE115 / CSE503 Introduction to Computer Science I. Dr. Carl Alphonce 343 Davis Hall alphonce@buffalo.edu. cell phones off laptops away name signs out. Announcements. TA office hours posted they begin NEXT week. Roadmap. Computer organization (brief overview)

morgan
Download Presentation

CSE115 / CSE503 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/ CSE503Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall alphonce@buffalo.edu

  2. cell phones off laptops away name signs out

  3. Announcements • TA office hours posted • they begin NEXT week

  4. Roadmap • Computer organization (brief overview) • Fetch-Decode-Execute cycle • Low-level and high-level languages

  5. 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

  6. Computer Organization • Central Processing Unit (CPU) • Registers • General purpose (e.g. R1 – R16) • Special purpose (e.g. Program Counter and Instruction Register) • Arithmetic Logic Unit (ALU) • Memory

  7. Computer Organization • Processor (CPU) • Memory (RAM) 11010010 R1 R2 11010010 . . . R16 11010010 11010010 PC IR 11010010 11010010 11010010 ALU

  8. Encoding instructions • Example • 1101000001000010 a bit string • 1101 000001 000010 bit groupings • INSTR ARG1 ARG2 general pattern • ADD Reg1 Reg2 specific instruction

  9. Instruction decoding • “ADD” • OP CODE • R2 • R1 • 1 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 • Circuitry to decode rest of instruction and carry it out (“execute” the instruction) This wire will carry a 1 only if the op code of the instruction is 1101.

  10. Fetch-Decode-Execute cycle • Fetch an instruction (& update PC) • Decode instruction • Execute instruction

  11. Low-level languages • Machine language • 1101000001000010 • Assembly language • ADD R1 R2

  12. Translation • LLL  LLL is called assembly • there is a 1:1 translation from assembly to machine language • fairly simple process

  13. High level languages • Java • We can write “x + y” instead of “ADD R1 R2” (in addition to with several MOV instructions) • Others: C#, Erlang, Python, ML, Prolog, Lisp, etc.

  14. Translation • LLL  LLL is called assembly • there is a 1:1 translation from assembly to machine language • fairly simple process • HLL  LLL is called compilation • there is no 1:1 translation • translation is quite complex • optimizations can be applied to make low level code more efficient

  15. Questions?

More Related