A partial data path of a processor is given in the figure, where RA, RB, and…

2025

A partial data path of a processor is given in the figure, where RA, RB, and RZ are 32-bit registers. Which option(s) is/are CORRECT related to arithmetic operations using the data path as shown?

  1. A.

    The data path can implement arithmetic operations involving two registers.

  2. B.

    The data path can implement arithmetic operations involving one register and one immediate value.

  3. C.

    The data path can implement arithmetic operations involving two immediate values.

  4. D.

    The data path can only implement arithmetic operations involving one register and one immediate value.

Attempted by 91 students.

Show answer & explanation

Correct answer: A, B, C

Key idea: each ALU input is fed through its own multiplexer that can select either a register value or an immediate value. The ALU control selects the arithmetic operation and the result is written to RZ.

  • Two registers: By selecting the register output for the first multiplexer (RA) and the register output for the second multiplexer (RB), the ALU receives two register operands and can perform register-register arithmetic, producing a 32-bit result in RZ.

  • One register and one immediate: By selecting a register on one multiplexer and an immediate on the other, the ALU receives one register operand and one immediate operand and can perform register-immediate arithmetic.

  • Two immediates: Because each multiplexer has its own immediate input, both multiplexers can select their immediate inputs simultaneously. The ALU then receives two immediate operands and can compute an immediate-with-immediate result (even if such an instruction is rarely used in practice).

Conclusion: The data path supports arithmetic with two registers, one register and one immediate, and two immediates. The statement that the data path can only implement one register plus one immediate is incorrect.

Correct answer(s): The descriptions that the data path can implement arithmetic operations involving two registers, one register and one immediate value, and two immediate values are all supported by the shown connections.

  1. The data path can implement arithmetic operations involving two registers.

  2. The data path can implement arithmetic operations involving one register and one immediate value.

  3. The data path can implement arithmetic operations involving two immediate values.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir