1 / 12

CSE111: Great Ideas in Computer Science

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. Announcements. First exam Wednesday next week Closed book Bring your UB card Monday next week: review. cell phones off (please). A flip-flop.

april
Download Presentation

CSE111: Great Ideas in Computer Science

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

  3. cell phones off (please)

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

  5. One-bit Half Adder A B S C

  6. One-bit Full Adder A B S Cin Cout

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

  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

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

  10. A closer peek at the ALU 0110 1101 A B (half adder) COut S A B (full adder) CoutCIn S A B (full adder) CoutCIn S A B (full adder) CoutCIn S 1 0 1 0 0 1 0 1

  11. Encoding instructions • Example • 1101000001000010 • 1101 000001 000010 • INSTR ARG1 ARG2 • ADD Reg1 Reg2

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

More Related