Computer organization: Inside a CPU datapath, which hardware unit actually performs arithmetic operations such as addition and subtraction?

Difficulty: Easy

Correct Answer: ALU

Explanation:


Introduction / Context:
Central processing involves fetching, decoding, executing, and writing back results. Within the execute phase, a specific hardware block carries out arithmetic and logic operations central to computation.


Given Data / Assumptions:

  • We refer to standard processor/datapath organization.
  • Arithmetic examples include add, subtract, increment, and compare.
  • Registers source operands and capture results.


Concept / Approach:
The Arithmetic Logic Unit (ALU) is responsible for arithmetic (add/sub) and logic (AND/OR/XOR, shifts) functions. Registers (e.g., accumulator, B register) hold data but do not implement arithmetic by themselves. The CPU is an overall system including control, registers, and ALU; it is not the specific arithmetic block.


Step-by-Step Solution:

Identify the ALU within the datapath.Route operands from registers to ALU inputs under control signals.Select the required function; ALU produces the result and flags.Write back to destination register or memory as needed.


Verification / Alternative check:
Block diagrams and HDL designs show an ALU module driving the result bus and status flags (Z, C, V, N).


Why Other Options Are Wrong:

  • Accumulator/B register: Storage elements; may feed the ALU but do not execute arithmetic operations alone.
  • CPU: A broader entity that contains the ALU among other components.


Common Pitfalls:
Equating a frequently used register (e.g., accumulator) with the arithmetic unit; overlooking control logic required to orchestrate ALU operations.


Final Answer:
ALU

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion