Addressing Modes- Q11

+1 vote

Consider the evaluation of the following expression tree on a machine with RISC architecture. Variables p, q, r, s, t, u and v are initially stored in memory. Binary operations can be performed only when all operands are in registers. The result is also produced in a register. What is the minimum number of registers needed to evaluate the expression, when no intermediate result can be stored in memory?

A. 3
B. 4
C. 5
D. 6

asked Jun 4 in Computer Organization by gbmentor (54,290 points)
edited Jun 5 by gbmentor

7 Answers

+1 vote
Best answer
Ans is 4.

Since the tree wasn't visible to students, then a fair chance to learn should be given to all.

Students should be able to do this by making a DAG or go by greedy method. If not been able to.....then comment down here, we will provide the solution
answered Jun 5 by vinayakjhapro18 (2,940 points)
KKK sir sure
0 votes

Where is the expression ! ??
answered Jun 5 by soumyadeeppro20 (1,720 points)
0 votes
This question is wrong because they have not given expression tree to evaluate the number of registers.
answered Jun 5 by tskushagra-guptacse (11,400 points)
+1 vote
Expression tree is missing the question. Marks will be given for all.
answered Jun 5 by getgatebook (31,090 points)
0 votes
Yes here tree is miss
answered Jun 5 by tsnikhilsharmagate2018 (19,690 points)
0 votes

4 registers needed

B is correct one
answered Jun 8 by tsnikhilsharmagate2018 (19,690 points)
0 votes

4 register b is correct one

answered Jun 8 by tsnikhilsharmagate2018 (19,690 points)
edited Jun 8 by tsnikhilsharmagate2018