Characteristics of the CPU Flashcards
What is the job of the CPU?
- The CPU is responsible for processing all data within the computer
What are the components of the CPU?
- Arithmetic and logic unit (ALU)
- Control unit (CU)
- Registers
What is a register?
- Temporary memory storage locations inside the CPU
- Used for a single specific purpose
- Faster access speed than RAM and secondary storage
What are the different registers?
- Program counter (PC)
- Accumulator (ACC)
- Memory address register (MAR)
- Memory data register (MDR)
- Current instruction register (CIR)
What are the different buses and their roles?
- Data bus: holds data being sent to/from the CPU and RAM
- Address bus: hold addresses being sent to/from the CPU and RAM
- Control bus: sends signals to determine whether the other buses are in read or write mode
What is the role of the arithmetic and logic unit?
- Performs and arithmetic calculations or logic comparisons (using AND, OR, NOT)
- The ALU is made up of several components
What is the role of the control unit?
- Instructions are decoded
- Controls the data within the CPU and how it moves around
What is the role of the program counter?
- Stores the address in memory of the next instruction that needs to be fetched
What is the role of the accumulator?
- Values are stored temporarily, either after they have been inputted or loaded or after being calculated in the ALU
What is the role of the memory address register (MAR)?
- Where addresses are stored, either about where data is being sent in memory or where it is being fetched from
What is the role of the memory data register (MDR)?
- Where data / instructions are stored, either before it is sent to memory or after being fetched
What is the role of the current instruction register (CIR)?
- When an instruction has been fetched from memory, it is loaded here before being split into opcode and operand
What is the ALU made up of?
- Arithmetic circuit: carries out any arithmetic calculations
- Logic circuit: carries out operations like AND, OR, NOT
- Registers: additional registers that can store data
- Status flags: overflow flag (if the value is too large), zero flag
- Buses: used to transport data around the ALU
What is the fetch-decode-execute (FDE) cycle?
- The process the CPU goes through repeatedly to process instructions
What are the 3 stages of the FDE cycle?
- Fetch: fetchin an instruction from memory, providing the address and receiving the instruction
- Decode: interpreting the instruction and retrieving the required data from memory
- Execute: the CPU carries out the required action
What registers are used in the fetch cycle?
- The program counter is loaded with 0
- The value from the program counter is copied to the memory address register
- The data from the memory address register (0) is sent across the address bus and the instruction to read the data is sent across the control bus
- The data from the location in memory (0) is sent across the data bus and stored in the memory data register
- The program counter is incremented by 1
What registers are used in the decode cycle?
- The data is sent from the memory data register to the current instruction register where it is split into opcode and operand
- This is sent to the control unit to be decoded
Which registers are used in the execute cycle?
- Which registers are used here depend on the instruction being executed
What are the main ways in which CPU performance can be measured?
- Clock speed
- Number of cores
- Cache
What is the clock speed and how does it effect CPU performance?
- The clock in the computer control operation in the CPU
- It repeatedly changes from 0 to 1 and then back to 0. Each one of these is known as a state change
- A state change can represent one FDE cycle, however some take more than one cycle
- Clock speed is measured in how many state changes take place in a second (Hz)
- If a computer has a higher clock speed, it will be able to execute more instructions per second and therefore, carry out tasks more quickly
What is a core and how does the number of cores effect CPU performance?
- A core is a processing unit within the CPU
- Each core runs at the same speed, therefore more cores doesn’t make the CPU faster
- Each core can carry out its own FDE cycle. Therefore, more cores means more instructions can be executed at the same time. This is known as parallel processing
What is cache and how does it effect CPU performance?
- Cache is part of the primary storage and is used to store frequently used data and instructions
- It is used as it is closer to the CPU than RAM and therefore faster to retreive data from
- The more cache there is, the more data can be stored and therefore, it speeds up the performance of the CPU
Different levels of cache
- Cache is split into 3 levels:
- Level 1: small and fast, one for each core
- Level 2: shared between cores, slower but larger than level 1
- Level 3: slower and larger than level 2, sits on the motherboard unlike level 1 and 2
What is pipelining?
- Pipelining is the process of carrying out multiple instructions concurrently (at the same time)
- Each instruction will be at a different stage of the FDE cycle
- One instruction can be fetched, while the one before is being decoded and the one before that is being executed