Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE115: Introduction to Computer Science I

Similar presentations


Presentation on theme: "CSE115: Introduction to Computer Science I"— Presentation transcript:

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

2 Announcements Cell phones off Name signs out

3 Today’s lessons Instructions are encoded as bit strings
Machine languages Fetch-Decode-Execute cycle Assembly languages High-level languages Requirements for a programming language

4 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

5 Computer Organization
Memory (RAM) Processor (CPU) R1 R2 . . . R16 PC IR ALU

6 Encoding instructions
Example INSTR ARG1 ARG2 ADD Reg1 Reg2

7 Instruction decoding “ADD” OP CODE R1 R2 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.

8 Fetch-Decode-Execute cycle
Fetch an instruction (& update PC) Decode instruction Execute instruction (load instruction into IR from location in PC) Fetch Update PC Decode Execute

9 Low-level languages Machine language Assembly language
Assembly language ADD R1 R2

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


Download ppt "CSE115: Introduction to Computer Science I"

Similar presentations


Ads by Google