The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
90 views

The following program fragment was written in an assembly language for a single address computer with one accumulator register:

LOAD B
MULT C
STORE T$_1$
ADD A
STORE T$_2$
MULT T$_2$
ADD T$_1$
STORE Z

Give the arithmetic expression implemented by the fragment.

asked in CO & Architecture by Veteran (115k points)
retagged by | 90 views
+1

[A+(B*C)]2 + (B*C)

2 Answers

0 votes

z=[(BC)+A]^2+(BC)

answered by (439 points)
0 votes
i am getting [A+(B*C)]^2 + (A+B*C)

because it is single address computer when we store  T2 in memory T1 will lost

and when we add T1 to accumulator at second last line  value present  in T2 will added to accumulator
answered by Loyal (9.1k points)

Related questions

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
48,634 questions
52,769 answers
183,405 comments
68,307 users