2,061 views
1 votes
1 votes

Consider the evaluation of following expression tree on a machine in which memory can be accessed only through load and store instructions. The variable p, q, r, s, t and u are initially  stored in memory. The binary operators used in the tree can be evaluated by the machine only when all operands are in register. The instruction produce result only in a register.

What is the minimum number of registers needed to evaluate the expression if, no intermediate results can be stored in memory?

1 Answer

4 votes
4 votes

I think 3 registers required only

Related questions

1.4k
views
2 answers
0 votes
Sandy Sharma asked Dec 26, 2018
1,394 views
Consider the following expression and identify minimum number of registers required to implement the following expression : (a-b)+(e+(c-d))/fCan anyone please give the th...
741
views
0 answers
1 votes
Aakash Das asked Oct 21, 2016
741 views
Do we have register interference graphs/ coloring in our syllabus and if so can someone please provide any online material for it.I am facing difficulty understanding how...
486
views
0 answers
0 votes
nbhatt asked Jan 12, 2023
486 views
817
views
2 answers
0 votes
palashbehra5 asked Jan 14, 2022
817 views
Given problem and answer : I am getting 3 minimum registers as answer, can anyone verify?here's how I am getting 3 :T1 = rT2 = sT1 = T1 * T2T2 = tT3 = uT2 = T2 – T3T1 ...