Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739

Similar presentations


Presentation on theme: "CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739"— Presentation transcript:

1 CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu

2 Announcements First exam Wednesday next week –Closed book –Bring your UB card Monday next week: review 2

3 cell phones off (please) 3

4 A flip-flop S (set) = 0 R (reset) = 0 remembered value 4

5 One-bit Half Adder 5 A B S C

6 One-bit Full Adder 6 A B CoutCout S CinCin

7 Encoding machine instructions Op-code + operands Hardware decodes and executes 7

8 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 8

9 Computer Organization 9 Processor (CPU) Memory (RAM) 11010010 R1R2... R16 PC IR ALU 11010010 00000001 00000010 00000011 00000100 00000101 00000110 00000111 Each memory location has a unique address

10 A closer peek at the ALU 10 1101 0110 A B (half adder) C Out S A B (full adder) C out C In S A B (full adder) C out C In S A B (full adder) C out C In S 1 1 0 0 001 1

11 Encoding instructions Example –1101000001000010 –INSTR ARG1 ARG2 –ADD Reg1 Reg2 11

12 This wire will carry a 1 only if the op code of the instruction is 1101. Instruction decoding 12 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) “ADD” OP CODE R1 R2


Download ppt "CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739"

Similar presentations


Ads by Google