Computer Babble Talk Dung X. Nguyen Rice University
What is a Computer? Google for “How to build a PC” So many electronic components How do they work together? How to master this complicated “mess”? Abstraction !
Abstraction Disregard non-essential details Identify and focus on key components Understand how they work together
Von Neumann Architecture Google for it nn_architecturehttp://en.wikipedia.org/wiki/Von_Neuma nn_architecture Memory Arithmetic Logic Unit (ALU) Control Unit (CU) Input/Output devices (IO)
Memory Stores Instructions and Data expressed in terms of 0’s and 1’s 0 and 1 are called bits (binary digit) Size measured in groups of 8 bits called byte; e.g. 2 MB (mega bytes) Roughly speaking a byte is what it takes to store one keystroke Speed measured in terms of number of bits per second called Hz; e.g. 100 MHz.
Memory Hierarchy The faster the memory, the more expensive From fast to slow –Register –Cache –RAM (Random Access Memory)
ALU Performs Arithmetic and Logical Computation Everything is expressed in terms of 0’s and 1’s
Control Unit Performs 5 stages of Fetch-Execute Cycle –Fetch instruction from memory to instruction register (IR) –Decode instruction (read registers if needed) –Execute ALU operation –Access (read/write) memory (if needed) –Write to registers (if needed)
Example lin/NewApplets/Sam2/Sam2.htmhttp:// lin/NewApplets/Sam2/Sam2.htm