The processor Flashcards
Explain the role of a processor
The processor or central processing unit is the internal hardware component of the computer that is responsible for processing data and executing the instructions of programs.
Explain the role of the ALU
It is responsible for performing arithmetic calculations and logical operations.
Explain the role of the control unit
The control unit is in charge of organising the sequence in which program instructions are executed, followed by decoding the instructions.
Explain the role of the clock
The system clock generates regular clock pulses by emitting a signal that continuously oscillates between a low (0) and a high (1) state.
Explain the role of general purpose registers
They keep the results of the intermediate calculations that are produced as part of a larger computation.
Explain the role of the program counter
Holds the address of the next instruction to be executed by the processor.
Explain the role of the current instruction register
Holds the current instruction that the processor is executing.
Explain the role of the memory address register
Temporarily holds the address of the memory location (in main memory) that the processor needs to access, either to read from or write to.
Explain the role of the memory buffer register
Temporarily holds the data values or instructions that are read from or written to the main memory.
Explain the role of the status register
Used to store information about the result of the last instruction that the ALU executed.
Explain the role of the accumulator
Stores the result of any calculation processed by the ALU.
What is an instruction set?
the complete set of all the instructions in machine code that can be recognized and executed by a CPU.
What can instructions consist of?
instructions consist of an opcode and
one or more operands (value, memory address
or register).
What happens in an immediate addressing mode?
The operand is treated as data.
What happens in a direct addressing mode?
the operand is treated as a memory address where data is stored.
What is an interrupt?
An interrupt is a signal that is sent to the processor to request immediate attention.
What happens when the processor is interrupted?
When the processor receives an interrupt request, it suspends what it is doing and runs the process associated with the interrupt.
What is an ISR?
An ISR (interrupt service routine) is a mini program that has been designed to respond to an interrupt’s request.
What are the steps of servicing an interrupt?
1) The processor receives the interrupt
2) The processor completes the fetch-decode-execute cycle of the instruction that it was running when it received the interrupt
3) The current contents of the processor registers (including the program counter) are saved to memory
4) The origin of the interrupt is identified so that the appropriate ISR is called
5) All other lower-priority interrupts are put on hold to allow the ISR to finish running
6) The program counter is updated with the address of the first instruction of the ISR
7) The ISR completes its execution
8) The processor registers are reloaded with the values that were saved to memory
9) The lower-priority interrupts that were put on hold are re-established
10) The program counter is set to point to the address of the next instruction that needs to be executed in the program that the processor was running when it received the interrupt