1.1 - Architecture of the CPU Flashcards
Give some examples of Input Devices
Keyboard, mice, trackpads, microphone
Give some examples of output devices
Monitors, speakers
What are the main components of a computer (not based on hardware)?
The CPU, main memory, secondary storage, Input and Output devices
Where is the CPU located?
On the motherboard (specifically the socket)
Purpose of the CPU
CPU runs and processes the instructions
How does the CPU run?
It runs one simple instruction at a time, which happens billions of times a second
What was the stored program concept?
It was the idea of storing the program instructions as well as data in memory
How were computers first run?
One instruction at a time using switches, or read in punch cards and executed one at a time
What year was when the stored program concept was born?
1943-44
What was the von Neumann architecture?
- Program instructions and data programs are both stored in the same memory
- CPU accesses both instructions and data from the same RAM
What are the components of the CPU?
2 major components called the Control Unit and the Arithmetic-Logic Unit (ALU). There are also registers that are used to carry out these operations
What are registers in the CPU?
A very fast memory location in the CPU, and cache is also located in the CPU, but although it is slower than registers, it is faster than storing memory in RAM which is much slower
Give some registers in the CPU
Program Counter (PC), Memory Address Register (MAR), Memory Data Register (MDR), Accumulator (ACC)
What does the Program Counter (PC) do?
Holds the address of the next instruction to be executed
What does the Memory Address Register (MAR) do?
Hold the memory address of current instruction and then the data that it uses so that these can be fetched from memory
What does the Memory Data Register (MDR) do?
Holds data or a program instruction temporarily when it is fetched from memory or is to be sent to memory.
What does the accumulator (ACC) do?
Holds the result of an instruction before it is transferred to memory
What is the Control Unit?
- Coordinates and controls all of the activities taking place within the CPU
- The control unit decode instructions and executes them
- It receives signals form the system clock
- It directs the timing and control of the other parts of the CPU, much like the conductor of the orchestra
What is the ALU?
- The ALU is where the actual arithmetic operations are done
- Some operation examples are logical operations like AND, OR, NOT
What is Fetch - Decode - Execute (FDE)
Repeats this process:
- Fetch an instruction from memory (program counter),
- Decodes the instruction (Control Unit),
- Executes the instruction (MAR and MDR).
FDE - Program Counter
The program counter hold the address of the next instruction and then increments the value by 1 as soon as the current instruction has been fetched
FDE - Accumulator
The Accumulator (ACC) is where arithmetic and logic results are temporarily stored
FDE - MAR and MDR
- If data is needed to fetched (commanded by the Control Unit), the MAR is then used to hold the address of the data to be used in the current instruction.
- Then this data is fetched and copied to the MDR
How does the MAR and MDR work together?
MAR knows where to look for data in RAM, the MDR keeps hold of that data until it is ready to be used by the CPU