CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Announcements First exam Wednesday next week –Closed book –Bring your UB card Monday next week: review 2
cell phones off (please) 3
A flip-flop S (set) = 0 R (reset) = 0 remembered value 4
One-bit Half Adder 5 A B S C
One-bit Full Adder 6 A B CoutCout S CinCin
Encoding machine instructions Op-code + operands Hardware decodes and executes 7
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
Computer Organization 9 Processor (CPU) Memory (RAM) R1R2... R16 PC IR ALU Each memory location has a unique address
A closer peek at the ALU 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
Encoding instructions Example – –INSTR ARG1 ARG2 –ADD Reg1 Reg2 11
This wire will carry a 1 only if the op code of the instruction is Instruction decoding Circuitry to decode rest of instruction and carry it out (“execute” the instruction) “ADD” OP CODE R1 R2