CPU Flashcards
What’s the purpose of the CPU
Runs the instructions from a program
What is Von Neumann architecture
Both program instructions and the data the programs are using are both stored in the same places
What are the 2 major components of the CPU
-Control unit
-Arithmetic-logic unit (ALU)
What are registers and what are they used for
A very fast memory location in the CPU itself that are used to carry out operations
Name the 4 registers in the CPU
-Program counter (PC)
-Memory address register (MAR)
-Memory data register (MDR)
-Accumulator
What does the program counter do
Holds the address of the next instruction to be executed
What does the memory address register do
Holds the memory address of the current instruction, andthen the data that it uses, so that these can be fetched from memory
What does the memory data register do
Holds the actual instruction, and then the data that has been fetched from memory
What does the accumulator do
Holds the result of an instruction before it is transferred to memory
What does he control unit do
It coordinates and controls all of the activities taking place within the CPU
-It decodes instructions and executes them
-it receives signals from the system clock
-It directs the timing and control of other parts of the CPU
What does the arithmetic logic unit do
Where the actual arithmetic operations are done. Also carries out logical operations
What is the fetch-decode-execute cycle
The CPU operates by repeating three operations
-FETCH: causes the next instruction and any data involved to be fetched from main memory
-DECODE: decodes the instruction
-EXECUT: the instruction is executed
This process is then repeated…
What does the program counter do
Holds the address of the next instruction to be executed
What does the accumulator do
Where the arithmetic and logic results are temporarily stored
What’s the order
1) The control unit decodes the instruction and decides if the data needs to be fetched
2) If so the MAR is then used to hold the address of the data to be used in the instruction
3) The data is fetched and copied to the MDR