The Gateway to Computer Science Excellence
+3 votes
469 views

The arithmetic expression

$$(a+b) * c- d/e ** l$$

is to be evaluated on a two address machine, where each operand is either a register or a memory location. 

With a minimum number of memory accesses of operands.the number of registers required to evaluate this expression is ______.

The number of memory accesses of operands is ____________

in Compiler Design by Active (3.5k points) | 469 views
0

I think * * means Exponentiation..

0
OUT OF SYLLABUS now??

1 Answer

+2 votes
Considering ** is for exponentiation.

3 registers are required & 6 memory operations in total to fetch all operands.
by Boss (30.8k points)
+1
Can you please elaborate .. ?
+2
ADD y,z

MUL y,c

MUL  e,l

DIV  d,e

SUB  y,d

here y,e,d are registers

operands y,z,c,e,l,d
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,741 questions
57,240 answers
198,004 comments
104,599 users