CPU Registers PC Arith Logic Unit Bus Interface
CPU Registers PC Arith Logic Unit Bus Interface System bus I/O Bridge Memory bus Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU – Central Processing Unit interprets and executes instructions. Registers PC Buses – electrical conduits which carry bytes (based on word size) between components. Arith Logic Unit Bus Interface Main Memory – temporary storage for the program instructions and its static, automatic, and dynamic memory System bus I/O Bridge Memory bus Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU I/O devices such as mouse, keyboard, monitor, and disk are connected to the I/O bus via controllers or adapters. Registers PC Arith Logic Unit Bus Interface Controllers are typically on the computer’s motherboard; whereas, adapters are separate boards. System bus I/O Bridge Memory bus Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU Program Counter (PC) is a special register containing the address of the next instruction to execute. Registers PC Arith Logic Unit Arithmetic Logic Unit (ALU) performs computations, comparisons, logic, and shifts. Registers are used as high-speed intermediate memory accessible by the ALU. Bus Interface System bus I/O Bridge Memory bus Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU The CPU interprets machine instructions (from programs which are in main memory). Some categories of instructions: Load load registers from a copy of data in main memory or other registers Store store from a copy of data in registers to main memory Registers PC Arith Logic Unit Bus Interface System bus I/O Bridge Memory bus Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU The CPU interprets machine instructions (from programs which are in main memory). Some categories of instructions (continued): Operate execute arithmetic, comparisons, logic or shifts using data in registers, storing the result in a register Jump branch to an address within a program by changing the PC Registers PC Arith Logic Unit Bus Interface System bus I/O Bridge Memory bus Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU User types. /add 2 10 20. Shell causes each keystroke to be brought into a register as it is captured. Registers PC Arith Logic Unit I/O Bridge Bus Interface Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU Registers PC Arith Logic Unit Shell stores what the user types in Main Memory as he/she types it I/O Bridge Bus Interface Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU When user presses enter, the shell makes a request to load the. /add 2 program into memory. Registers PC Arith Logic Unit I/O Bridge Bus Interface Determining to load. /add 2 takes steps which we are not showing Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU Execution begins with the Program Counter (PC) set to the beginning address of the program. Registers PC Arith Logic Unit I/O Bridge Bus Interface Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU The CPU fetches an operation at the address in the PC. It then • Decodes the instruction to understand the operation and its operands. • If necessary, fetches the operands • Increments the PC past the instruction • Executes the operation Registers PC Arith Logic Unit I/O Bridge Bus Interface Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU It loads 10 and 20 into registers based on separate instructions. Registers PC Arith Logic Unit 10 20 I/O Bridge Bus Interface Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU Based on another instruction, the ALU adds 10 to 20, storing the result in a that register. Registers PC Arith Logic Unit 10 30 I/O Bridge Bus Interface Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU Another instruction causes 30 to be written in main memory. Registers PC Arith Logic Unit 10 20 30 I/O Bridge Bus Interface Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
CPU Another instruction causes 30 to be displayed on the monitor by taking the value from memory and sending it to the graphics adapter. Registers PC Arith Logic Unit 10 30 I/O Bridge Bus Interface Main Memory I/O Bus Expansion Slots USB Controller Mouse Keyboard Disk Controller Graphics Adapter Monitor Disk
- Slides: 15