Aspire Faculty ID #16660 · Topic: CUET 2023 · Just now
CUET 2023

Consider the expression $(a-1)*\left(\dfrac{(b+c)}{3}+d\right)$.
Let $x$ be the minimum number of registers required by an optimal code generation (without any register spill) algorithm for a load/store architecture in which
(i) Only load and store instructions can have memory operands and
(ii) Arithmetic instructions can have only register or immediate operands.

The value of $x$ is _______.

Solution

The expression requires evaluation of $(b+c)$, then division by $3$, then addition with $d$, and finally multiplication with $(a-1)$.
Minimum registers needed to hold intermediate results without spill = 3.

Previous 10 Questions — CUET 2023

Nearest first

Next 10 Questions — CUET 2023

Ascending by ID
Ask Your Question or Put Your Review.

loading...