SLR 1/The CPU Flashcards
What are the 5 register in the CPU
Program Counter (PC)
Accumulator (ACC)
Memory Address Register (MAR)
Memory Data Register (MDR)
Current Instruction Register (CIR)
What are 3 buses in the CPU
Data bus
Address Bus
Control Bus
What does The Program Counter (PC) do?
The PC holds the address of the next instruction to be executed. Address held in the program counter is copied to the MAR.
What does the Accumulator (ACC) do?
The ACC holds the results of the calculations performed by the ALU. It also holds data that will be used in a calculation. It general purpose.
What does the Memory Address Register (MAR) do?
The MAR holds the memory address of the data/instruction read from or written to memory (RAM/ROM). Sends the address down the address bus to RAM.
What does the Memory Data Register (MDR) do?
The MDR holds the data temporarily. It is known as the “Gateway to the processor”. All data must go down the data bus and pass the MDR. holds the contents that where within the MAR.
What does the Current Instruction Register (CIR) do?
The CIR holds the instruction that the processor is executing. Contents of the MDR copied to the CIR. This contains the operand and the opcode. The operand will be either an address or data to be processed. The opcode will be the specific instruction to be executed such as ADD. For example LDA 1000
Other than the 5 registers, buses and cache, what are the two other components of the CPU?
Arithmetic Logic Unit (ALU)
Control Unit (CU)
What does the Arithmetic Logic Unit (ALU) do?
The ALU performs arithmetic calculation such as addition and logical comparisons such as less than. This allows the program to make decisions
What does the Control Unit (CU) do?
The control unit manages the execution of instructions in the CPU. it is responsible for fetching, decoding and executing each instruction by sending control signals to the other components of the CPU. Its stores the instructions results in memory and sends signals on the control bus.
Define registers.
small amounts of fast memory on the CPU. Each register holds just one value.
Fetch stage in the FDE cycle
1.The PC holds the address of the next instruction.
2.This address is copied into the MAR.
3. Address sent along address bus to RAM where it waits for signal from control bus
4. CU sends the signal, once received the contents in the RAM are sent on the data bus to the MDR
5. Data copied from MDR to CIR. Instruction is fetched
6. PC is incremented so it can get the next instruction
Decode stage of the FDE cycle
7.Instruction in CIR is now decoded by the decode unit.
8.Instruction made of the Opcode and Operand. Opcode is what we need to do and Operand is what we are going to do it to.
Execution stage of the FDE cycle
- Sends the decoded address to the MAR.
- This goes down the address bus into RAM.
- Control Unit sends a read signal along the control bus to RAM
- Contents are read and sent through the data bus to the MDR
13.Contents of MDR are copied to Accumulator and the cycle is complete.
List the 6 factors that affect the CPUs performance and explain how?
- Number of Cores - multiple cores on a single chip – this means more than one instruction can be executed at a time.
- Size of the Registers - The size of the registers determines the amount of data with which the computer can work at a one time.
- RAM - The more RAM a PC has, the more program instructions and data can be held in memory, which is faster than disk storage.
4.Clock Speed - A single “tick” of the clock is the time required to turn a transistor off and back on – this is called a clock cycle. Clock cycles are measured in hertz (Hz), a measure of cycles per second. The faster a PC’s clock runs, the more instructions the PC can execute per second.
- Data bus - The data bus width determines how many bits can be transmitted between the CPU and other devices. The wider the data bus, the more bits can be transmitted at once, reducing the number of fetches
- Cache - Cache is made of very high-speed components and reduces the number of fetches for both instructions and data. Recently executed instructions – for example, in a loop – will be stored in the cache.