Basic Machine Architecture

Basic Machine Architecture includes:

  • Memory: store/load instructions
  • Arithmetic Logic Unit (ALU): perform primitive operations
  • Control Unit: has a program counter to keep track of where things are and ask the ALU to perform operations. It is initially pointed to the first instruction


Below are basic steps:

  1. Read in instruction, ie. interpreter translate codes into instruction steps and stores inside Memory
  2. Interpreter execute first instruction pointed by program counter in Control Unit
  3. First instruction: runs through ALU, perform primitive operations, then stores it back into Memory
  4. Program counter increases by 1, ie. go to the next instruction
  5. Every once in a while, one of the instruction is a Test. If Test is true, it will change the Program Counter which allows the machine to run to a different instruction (whether back or forward), ie. changing where we are in the code
  6. Reaches the point where we're done, then it will Output
Turing showed that using 6 primitives (Turing complete), can compute anything. Click here to read more. Modern programming languages have a more convenient set of primitives. Also have ways to abstract methods to create new "primitives"

Comments

Popular posts from this blog

Conditional Statements

6.00.1x - Week 2