Explain the role and operation of a processor and its major components:
- arithmetic logic unit
- control unit
- clock
- general-purpose registers
- dedicated registers, including:
- program counter
- current instruction register
- memory address register
- memory buffer register
- status register.
Component | Role + Operation |
---|---|
ALU (Arithmetic Logic Unit) | Performs arithmetic and logical operations on the data. It can perform instructions such as ADD, SUBTRACT, DIVIDE, MULTIPLY on fixed or floating point numbers. Can also perform shift operations and Boolean logic operations. |
Control Unit | Controls and coordinates the activities of the CPU, directing the flow of data between the CPU and other devices. Accepts the next instruction, decodes it into several sequential steps such as fetching addresses and data from memory, manages its execution and stores the resulting data back in memory or registers. |
Clock | Generates a series of signals switching between 0 and 1 several million times per second and synchronising CPU operations. A CPU cannot perform operations faster than the clock cycle, some CPU operations take multiple clock cycles. |
General-purpose registers | Discrete memory locations within the CPU designed to hold temporary data and instructions |
Dedicated Register | Role + Operation |
---|---|
Program Counter | An incrementing counter that keeps track of the memory address of which instruction is to be executed next |
Current Instruction Register | A temporary holding ground for the instruction that has just been fetched from memory |
Memory Address Register | Holds the address in memory of the next instruction to be executed |
Memory Buffer Register | A two-way register that holds data fetched from memory(and ready for CPU to process) or data waiting to be stored in memory. |
Status Register | Contains information about the state of the processor; bits that are set and cleared based on the results of the instruction. Allows the CPU to store information such as the occurrence of an overflow. This information can be used to decide whether or not to branch out of a given sequence of instruction. |