Using a stack organized computer with zero address


Write a program to evaluate the arithmetic statement:
X = A*(B + C) + D / E* F +G
1. Using a general register computer with three-operand instructions
2. Using a general register computer with two-operand instructions
3. Using an accumulator type computer with one-operand instructions
4. Using a stack organized computer with zero address instructions (stack instructions)
Do not modify the values of A, B, C, D, E, F or G. Use a temporary location T to store the intermediate results if is necessary.

1. Using a general register computer with three-operand instructions
ADD X,B,C
MUL X,X,A
Continue

2. Using a general register computer with two-operand instructions
MOV X,B
ADD X,C
MUL X,A
Continue

3. Using an accumulator type computer with one-operand instructions
LOAD B
ADD C
MUL A
Continue

4. Using a stack organized computer with zero address instructions (stack instructions)
PUSH A
PUSH B
PUSH C
MUL
Continue

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Using a stack organized computer with zero address
Reference No:- TGS087949

Expected delivery within 24 Hours