✅1.1.1 Structure and function of the processor Flashcards
What does the control unit do?
- Coordinates all activities of the CPU
- Directs the flow of data between the CPU and other devices
- Accepts the next instruction, decodes it, handles its execution, and stores the resulting data back in memory or registers
What does the Accumulator do?
- A register in the processor that stores data and control information
- The results of calculations carried out by the ALU can be temporarily stored here
What does the Program Counter do?
A register in the processor that holds the address of the next instruction to be executed
What does the Arithmetic Logic Unit do?
- Performs arithmetic and logical operations on data
- It can perform ADD, SUBTRACT, MULTIPLY, DIVIDE on fixed and floating point numbers
- Performs shift operations, shifting bits to the left or right within a register
- Carries out Boolean logic operations, comparing two values and using operators such as AND, OR, NOT, XOR
What does the Memory Address Register do?
- Holds the address of the memory location from which data or an instruction is to be fetched or to which the data is to be written
- Sends these address to memory down the address bus
What does the Memory Data Register do?
- Used to temporarily store the data which us read from or written to memory.
- Gateway to the processor
- All data to and from memory must travel down the data bus and pass through the MDR.
What does the Current Instruction Register do?
- Holds the current instruction being executed
- The contents of the MDR are copied to the CIR if it is an instruction.
- Contains the opcode and operand(s) of the current instruction.
What happens during the fetch stage of the FDE cycle?
- The address of the next instruction is copied from the program counter (PC) to the memory address register (MAR).
- The instruction held at that address is copied to the memory data register (MDR). Simultaneously, the content of the PC is incremented so that it holds the address of the next instruction.
- The contents of the MDR are copied to the current instruction register (CIR).
What happens during the decode stage of the FDE cycle?
The instruction held in the CIR is decoded. The instruction is split into opcode and operand and the opcode is used to determine the type of instruction and what hardware to use to execute it. The operand holds either:
- the address of the data to be used with the operation, which is then copied to the MAR, or
- the actual data to be operated on, which will be copied to the MDR
- the data to be operated on may be passed to the ALU/accumulator
What happens during the execute stage of the FDE cycle?
The appropriate instruction/opcode is carried out on the operand
What does the data bus do?
Stores data being sent to and from the CPU and RAM
What does the address bus do?
Stores the address of data being sent to and from the CPU and RAM
What does the control bus do?
Sends signals to determine whether the other buses are in read or write mode
What are registers?
Small memory cells that operate at high speeds.
They are used to temporarily store data and all arithmetic, logical and shift operations occur in these registers.
What is a bus?
A set of parallel wires connecting two or more components together
What is a system bus?
The collection of the data bus, address bus, and control bus is called the system bus.
What is the width of a bus?
The number of parallel wires it has
What does adding a wire to the address bus do to the number of addressable locations ?
It doubles the number of addressable locations
What does Bus Request indicate?
Indicates a device is requesting access to the data bus
What does Bus Grant indicate?
Indicates the CPU has granted access to the data bus
What does memory write do?
Causes data on the data bus to be written into the addressed location
What does memory read do?
Causes the data from the addressed location to be placed onto the data bus
What does the interrupt request control signal indicate?
Indicates that a device is requesting access to the CPU
What is the clock control signal used for?
It is used to synchronise instructions