Basic Machine Architecture
Basic Machine Architecture includes:
Below are basic steps:
- 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:
- Read in instruction, ie. interpreter translate codes into instruction steps and stores inside Memory
- Interpreter execute first instruction pointed by program counter in Control Unit
- First instruction: runs through ALU, perform primitive operations, then stores it back into Memory
- Program counter increases by 1, ie. go to the next instruction
- 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
- 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
Post a Comment