Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

* COMPUTER ORGANIZATION 1) c = (a + b) /a d = b*(a + b) / a * c e = a* (c + d) W

ID: 3787594 • Letter: #

Question

* COMPUTER ORGANIZATION

1) c = (a + b) /a

    d = b*(a + b) / a * c

    e = a* (c + d)

Write the assembly to do the following statements for each of the following architectures. Use the least number of instructions.

A)Stack ISA

B)Accumulator ISA

2) Consider creating a Stack ISA. You need to have math instruction, logic instruction, pop and push instructions. Your ISA can have 8-bit and 16-bit unsigned numbers. The memory address is 16-bits. Write out the instruction you will have and show the encoding. Create the opcode that you need for the stack.

3) Do the same as in question 2 but for an accumulator ISA

Explanation / Answer

Stack ISA
............


Push a
Push b
Add
Push a
Div
Pop c
Push a
Mul
Push b
Push a
Push b
Add
Mul
Div
Pop d
Push c
Add
Push a
Mul
Pop e


Accumaltor ISA
..................


Load a
Add b
Store t
Div a
Store c
Mul a
Store c
Load b
Add a
Store y
Mul b
Div c
Store d
Add c
Mul a
Store e