From USD 89898989898989.00
Evaluate the expression { ( u + v ) + ( w + x )} +( y + z ). exactly as parenthesized ( that is do not use the commutative or associative laws to re order the addition ) . Give register lavel machine code to provide the maximum possible PARALLELISM .
1) LD R 1 , uย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย //ย ย R 1 = u
2) LD R 2 , vย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย //ย ย ย R 2 = v
3) ADD R 1 , R 1 , R 2ย ย ย ย ย ย ย ย ย ย ย //ย ย ย ย R 1 = R 1 + R 2
4) LD R 2 , wย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย //ย ย ย ย ย ย R 2 = w
5) LD R 3 , xย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย //ย ย ย ย ย ย R 3 = x
6) ADD R 2 , R 2 , R 3ย ย ย ย ย ย ย ย ย //ย ย ย ย R 2 = R 2 + R 3
7) ADD R1 , R1 , R2ย ย ย ย ย ย ย ย ย ย //ย ย ย R 1 = R 1 + R 2
8) LD R 2 , yย ย ย ย ย ย ย ย ย ย ย ย ย ย ย ย //ย ย ย R 2 = y
9) LD R 3 , zย ย ย ย ย ย ย ย ย ย ย ย ย ย ย //ย ย ย ย ย R 3 = z
10) ADD R 2 , R 2 , R 3ย ย ย ย ย ย //ย ย R 2 = R 2 + R 3ย
11) ADD R 1 , R 1 , R 2ย ย ย ย ย ย //ย ย R 1 = R 1 + R 2
ย MACHINE CODE FOR THE ARITHMETIC EXPRESSIONย ย { ( u + v ) + ( w + x )} +( y + z )Below a parallel computation for the same evolution , in which the expression could be evaluated in 4 steps on the 11 steps side .
Total steps in minimal register allocation/implementation = 11
Total steps using maximal PARALLELISM = 5
Thus the no. of steps saved = 6
1)ย R 1 = u | R 2 = v | R 3 = w | R 4 =ย x | R 5 =ย y | R 6 =ย z |
2) R 7 = R1 + R 2 | R 8 = R 3 + R 4 | R 9 = R 5 + R 6 | |||
3) R 10 = R 7 + R 8 | |||||
4) R 11 = R 10 + R 9ย |
This site was designed with Websites.co.in - Website Builder
This website was created by a user of Websites.co.in, a free instant website builder. Websites.co.in does NOT endorse, verify, or guarantee the accuracy, safety, or legality of this site's content, products, or services. Always exercise cautionโdo not share sensitive data or make payments without independent verification. Report suspicious activity by clicking the report abuse below.
We appreciate you contacting us. Our support will get back in touch with you soon!
Have a great day!
Please note that your query will be processed only if we find it relevant. Rest all requests will be ignored. If you need help with the website, please login to your dashboard and connect to support