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 stackoriented 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
PUSH
SUB
PUSH
ADD
PUSH
MUL
PUSH
SUB
B Convert the above zeroaddress instruction program in a twoaddress instruction program. Calculate the number of bits required to execute the zeroaddress and twoaddress instruction format and justify the outcome.
Assume: The opcode uses bits, register address uses bits and memory address uses bits.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
