
Internal Architecture of Processors
Modern processors are complex machines that execute billions of instructions per second. To master computer architecture, you must become familiar with the key components inside the CPU, how…

What does the Program Counter (PC) store during program execution?
In a zero‑address (stack) machine, which two instructions are primarily used to manipulate the stack?
Which register holds the instruction currently being decoded by the processor?
What is the main purpose of the Control and Command Unit (CCU) in a processor?
Which addressing mode places the operand directly inside the instruction itself?
When using indexed addressing, how is the effective address of an operand calculated?
What does the status register (PSW) primarily contain?
During the fetch‑decode‑execute cycle, which step immediately follows loading the instruction into the Instruction Register (IR)?
Which of the following best describes a CISC instruction set?
In a processor with general‑register architecture, how are operands typically accessed?
What is the effect of the sequencer component within the CCU?
Which register type is specifically used to calculate effective addresses for indexed addressing?
When a processor executes a LOAD instruction, which component is typically involved first?
Which of the following addressing modes is most appropriate for implementing jump (branch) instructions?
What is the typical size range of a processor register according to the lecture?
During the execution of an instruction, which step comes directly after loading necessary data into general registers?
Which instruction format uses the accumulator as the implicit destination for results?
What is the primary function of the decoder within the CCU?
In a RISC architecture, which characteristic is typically emphasized?
Which of the following best describes the role of the clock signal in the processor?
When an instruction uses direct addressing, where is the effective address of the operand found?
What is the main advantage of using a stack‑based (zero‑address) architecture for expression evaluation?
Understanding the Internal Architecture of Processors
Modern processors are complex machines that execute billions of instructions per second. To master computer architecture, you must become familiar with the key components inside the CPU, how they interact, and the fundamental concepts such as registers, addressing modes, and control logic. This course breaks down each element, explains its role, and connects the theory to the quiz questions you may encounter.
1. Core Functional Units of the CPU
The CPU can be viewed as a collection of specialized units, each responsible for a distinct part of the instruction‑execution cycle. The most important units are:
- Arithmetic and Logic Unit (ALU) – Performs all arithmetic (addition, subtraction, multiplication, etc.) and logical operations (AND, OR, NOT, comparisons). This directly answers the quiz question: "Which component of the CPU is responsible for performing arithmetic and logical operations?" The correct answer is the ALU.
- Control and Command Unit (CCU) – Also called the Control Unit (CU). It generates the control signals that orchestrate data movement between registers, the ALU, memory, and I/O devices. It decides which operation the ALU should perform and when data should be written or read.
- Registers – Small, fast storage locations inside the CPU. They hold operands, intermediate results, and control information. Important registers include the Program Counter (PC), Instruction Register (IR), Accumulator (ACC), and various general‑purpose registers.
2. The Program Counter (PC)
The Program Counter is a special register that always points to the address of the next instruction to be fetched from memory. During execution, the PC is automatically incremented (or altered by branch instructions) so the processor knows where to continue.
Quiz reference: "What does the Program Counter (PC) store during program execution?" The correct answer is the address of the next instruction to be executed. Understanding the PC is essential for grasping sequential execution, jumps, calls, and returns.
3. Instruction Register (IR)
Once the instruction is fetched from memory, it is placed into the Instruction Register. The IR holds the binary representation of the current instruction while the decoder interprets its opcode and operands. This enables the CCU to generate the appropriate control signals.
Quiz reference: "Which register holds the instruction currently being decoded by the processor?" The answer is the Instruction Register (IR).
4. Stack‑Based (Zero‑Address) Machines
Some architectures, especially early stack machines, use a zero‑address format where operands are implicitly taken from the top of a stack. The stack pointer (SP) tracks the top of the stack, and two fundamental instructions manipulate it:
- PUSH – Places a value onto the stack, incrementing the SP.
- POP – Removes the top value from the stack, decrementing the SP.
Quiz reference: "In a zero‑address (stack) machine, which two instructions are primarily used to manipulate the stack?" The correct pair is PUSH and POP.
5. The Role of the Control and Command Unit (CCU)
The CCU is the brain that coordinates every step of instruction execution. It does not perform arithmetic itself; instead, it:
- Generates control signals that enable the ALU to perform a specific operation.
- Activates read/write lines for memory and I/O.
- Manages the flow of data between registers, the stack, and the ALU.
Quiz reference: "What is the main purpose of the Control and Command Unit (CCU) in a processor?" The correct answer is Generate control signals for ALU, memory and I/O.
6. Addressing Modes
Addressing modes define how an instruction specifies the location of its operands. The most common modes include:
- Immediate addressing – The operand value is encoded directly within the instruction itself. This is the fastest way to use a constant.
- Direct (absolute) addressing – The instruction contains the memory address where the operand resides.
- Indirect addressing – The instruction points to a memory location that holds the actual address of the operand.
- Indexed addressing – The effective address is computed by adding an index register to a displacement field in the instruction.
Quiz reference: "Which addressing mode places the operand directly inside the instruction itself?" The answer is Immediate addressing.
7. Indexed Addressing in Detail
Indexed addressing is widely used for accessing arrays and tables. The effective address (EA) is calculated as:
EA = Index Register + Address Field (displacement)
This allows a program to iterate through contiguous memory locations simply by incrementing the index register.
Quiz reference: "When using indexed addressing, how is the effective address of an operand calculated?" The correct answer is Index register + address field.
8. Status Register (Program Status Word – PSW)
The Status Register, often called the Program Status Word (PSW), holds flags that reflect the outcome of recent operations. Typical flags include:
- Zero (Z) – Set if the result of an operation is zero.
- Sign (S) / Negative (N) – Indicates a negative result.
- Carry (C) – Indicates an overflow from the most‑significant bit.
- Overflow (V) – Indicates signed overflow.
These flags are essential for conditional branching and for the programmer to make decisions based on previous calculations.
Quiz reference: "What does the status register (PSW) primarily contain?" The correct answer is Flags indicating the result of the last operation.
9. Putting It All Together: The Instruction Cycle
Understanding each component becomes clear when you follow the classic five‑stage instruction cycle:
- Fetch – The PC provides the address of the next instruction; the instruction is fetched from memory and placed in the IR.
- Decode – The CCU decodes the opcode in the IR, determines which registers and addressing mode are involved, and prepares control signals.
- Execute – The ALU performs the required arithmetic or logical operation, using operands from registers or memory.
- Memory Access – If the instruction involves a load or store, the appropriate memory address is calculated (using direct, indirect, or indexed addressing) and data is transferred.
- Write‑Back – Results are written back to a destination register or memory location, and the PSW flags are updated.
During this cycle, the PC may be updated (for sequential execution or branch instructions), the SP may be adjusted (for stack operations), and the PSW may be altered based on the ALU outcome.
10. Frequently Asked Questions (FAQ)
- Why is the ALU separate from the Control Unit? – Separation allows the CCU to focus on sequencing and signal generation while the ALU specializes in fast arithmetic/logic operations. This modularity improves speed and simplifies design.
- Can a processor have more than one ALU? – Yes. Modern superscalar and multi‑core CPUs often contain multiple ALUs (and other execution units) to execute several instructions in parallel.
- What happens if the PC points to an invalid address? – The processor typically raises an exception or interrupt, invoking the operating system’s error‑handling routine.
- How does indexed addressing differ from base‑plus‑offset addressing? – They are conceptually similar; the term “index” emphasizes array traversal, while “base‑plus‑offset” is often used for stack frames or structure fields.
11. Review Checklist
Before you finish this module, ensure you can answer the following without looking at notes:
- Identify the component that performs arithmetic and logical operations (ALU).
- Explain the purpose of the Program Counter and what it stores.
- Recall the two primary stack instructions in a zero‑address machine (PUSH, POP).
- State which register holds the currently decoded instruction (IR).
- Describe the main function of the Control and Command Unit (generate control signals).
- Distinguish immediate addressing from other modes.
- Compute an effective address using indexed addressing (Index Register + Displacement).
- List the types of flags stored in the PSW.
12. Further Reading and Resources
To deepen your knowledge, explore these reputable sources:
- Computer Organization and Design by David Patterson and John Hennessy – A classic textbook covering CPU internals, pipelines, and instruction sets.
- MIT OpenCourseWare – 6.004 Computation Structures – Lecture videos on ALU design, control logic, and addressing modes.
- Wikipedia – Control Unit and Instruction Register articles for quick reference.
By mastering these concepts, you will be well‑prepared for both academic exams and real‑world tasks involving low‑level programming, compiler design, and hardware troubleshooting.
