in Compiler Design
357 views
0 votes
0 votes

in Compiler Design
357 views

4 Comments

2 is given as the answer. Check the solution. Please Explain. 

 

0
0
ohh...2 is also possible.....the explanation seems right to me
0
0
yeah !! here we go,

don't by hard at it i just explain this according to me

WE need minimum no of register that will perform same operation and give us output same as d.

 R1= c and R2 = b  
R1 = R2 + R1    (means we add c and d and store in R1)

                                      now R1 is consider as "a"

R2 = R1 + R2  (R1 is already "a" and store "d" in R2 , add "a" and "d")

                                 match this to question then result  R2 is  "b" so                                                      consider R2 as "b"

finally R1 = R1 + R2  (means a+b )

    and return R2.

I know i am not good at explaination but i did my best ... Correct me if i wrong.
0
0

Please log in or register to answer this question.