SLR1- Structure and Function of the Processor Flashcards
What is the purpose of the Control Unit?
- Coordinates all activities of the CPU
- Directs flow of data between CPU and other devices
- Accepts the next instruction, decodes it, handles execution and stores data back in memory or registers.
- Sends read and write requests to main memory on the control bus, as well as other requests such as interrupt requests.
What is the purpose of the Program Counter?
- Holds the address of the next instruction to be executed (could be next in sequence or address to jump to if current instruction is a jump or branch- copied from CIR)
- At the end of FDE cycle the address held in the PC is copied to the MAR
What is the purpose of the MAR?
- Holds the address or memory location from which data or an instruction is to be fetched or to which data is to be written.
- Sends the address to memory down the address bus.
What is the MDR used for?
- Used to temporarily store the data which is read from or written to memory.
- Sometimes known as the MBR (memory buffer register) also nicknamed the gateway to the processor.
- All data from memory must travel down the data bus and pass through the MDR
What is the purpose of the Current Instruction Register?
- Holds the current instruction being executed.
- Contents of MDR are copied to CIR if it is an instruction.
- Contains the opcode and operand(s) of the current instruction
What is the purpose of the Arithmetic Logic Unit?
- Performs arithmetic and logical operations on data.
- Arithmetic operations on fixed and floating point numbers
- ADD
- SUBTRACT
- MULTIPLY
- DIVIDE
- Bitwise shift operations left and right.
- Boolean logic operations
- AND
- OR
- NOT
- XOR
- Comparison
- Often uses general-purpose registers to store results of calculations such ass the accumulator
What is the purpose of the Accumulator?
- One of many general-purpose registers.
- Data control info is often stored in them.
- Typically, the more general-purpose registers a processer has, the faster it may operate.
- Results of ALU calculations are often stored here.
What is the purpose of the Address Bus?
- Carries memory addresses that identify where the data is being read from or written to.
What is the purpose of the Data Bus?
- Carries the binary 1’s and 0’s that make up the actual information being transmitted around the computer
What is the purpose of the Control Bus?
- Carries command and control signals to and from every other component of the CPU/Computer
What is add in assembly code?
ADD
What is subtract in assembly code?
SUB
What is store in assembly code?
STA
What is load in assembly code?
LDA
What is branch always in assembly code?
BRA
What is branch if zero in assembly code?
BRZ
What is branch if positive in assembly code?
BRP
What is input in assembly code?
INP
What is output in assembly code?
OUT
What is end program in assembly code?
HLT
What is data location in assembly code?
DAT
What happens during the fetch stage?
- Program counter is checked.
- Addressed store is then copied into the MAR
- Address is then sent along the address bus to main memory where it waits to receive a signal from the control bus.
- Control unit sends read signal along control bus.
- Contents in address send along the data bus to the MDR and copied to the CIR
- Program counter contents are incremented so that it points to the next address to be executed.
What happens during the decode stage?
- Instruction held in CIR is decoded by decode unit.
Parts of an instruction?
Opcode: what to do
Operand: what to do it to