Question: Assume that PUSH and POP are two stack operations on a stack - oriented CPU. The top one or two stack components are always involved

Assume that PUSH and POP are two stack operations on a stack-oriented CPU. The top one or two stack components are always involved in arithmetic operations. Considering the initial state of an empty stack, show the elements in the stack after executing each instruction from the below code segment.
PUSH 9
PUSH 3
SUB
PUSH 12
ADD
PUSH 10
MUL
PUSH 5
SUB
B. Convert the above zero-address instruction program in a two-address instruction program. Calculate the number of bits required to execute the zero-address and two-address instruction format and justify the outcome.
Assume: The opcode uses 4 bits, register address uses 8 bits and memory address uses 16 bits.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!