write three address instruction for given A + (B*C)-(D*E)
Question
write three address instruction for given A + (BC)-(DE)
Solution 1
Sure, here are the three-address instructions for the given expression A + (BC) - (DE):
- T1 = B * C
- T2 = D * E
- T3 = A + T1
- T4 = T3 - T2
Here, T1, T2, T3, and T4 are temporary variables that hold the intermediate results.
Solution 2
Sure, here is the three-address code for the given expression A + (BC) - (DE):
- T1 = B * C
- T2 = D * E
- T3 = A + T1
- T4 = T3 - T2
In this code, T1, T2, T3, and T4 are temporary variables that hold intermediate results. The final result is stored in T4.
Similar Questions
Consider expression a = b * – c + b * – c. Convert it into Three address code andconstruct triple, Quadruple, Indirect Triples
X=(A+B)*(C+D) is implemented using ________ type instructions. Add R1,A,BAdd R2,C,DMul X,R1,R2Question 2Answera.Three addressb.Two addressc.One addressd.Zero address
What are the representations of three address code?
ADD R1, R2 is which type of instructionGroup of answer choices2 address3 address1 address0 address
What is three address code?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.