Different CPUs follow different instruction formats such as three-address,…

Different CPUs follow different instruction formats such as three-address, two-address, one-address (accumulator-based), and zero-address (stack-based) instructions. Explain these instruction types and how they differ in terms of operand specification and instruction execution.

Attempted by 225 students.

Show answer & explanation

Instruction formats define how operands are specified and how operations are executed by a CPU, leading to different architectural designs.

Three-Address Instructions: Specify two source operands and one destination. Execution is fast and flexible but instruction length is larger.

Two-Address Instructions: Specify one source and one destination, where the destination also acts as an operand. This reduces instruction size.

One-Address Instructions (Accumulator-Based): Use an implicit accumulator as one operand; the instruction specifies only one address. Hardware is simple but requires more instructions.

Zero-Address Instructions (Stack-Based): Use a stack, where operands are taken implicitly from the stack top. Instructions are compact but rely heavily on stack operations.

image.png


Explore the full course: Zero To Hero

Loading lesson…