1,374 views
1 1 vote
A stack based CPU executes the instruction. Memory location $500$ contain $0X 88$ and memory location $700$ contain $0X37$. The stack pointer is at $0X003F$

The instruction are as follows:

$I_{1}:PUSH$  $500$

$I_{2}:PUSH$. $700$

$I_{3}:ADD$

$I_{4}:POP$. $600$

$I_{5}:PUSH$  $300$

Now which of the following is correct?

$A)$ Stack pointer will be $0X0040$ after executing instructions.

$B)$  Memory location $0X40$ contain $0X88$ after execution of instruction.

$C)$  Memory location $600$ contain $0XBF$ after execution of instruction.

$D)$ Both $a)$ and $c)$

1 Answer

0 0 votes

since the memory location 600 is popped when the stack pointer was pointing to the sun 0X88  so clearly the location of 0X88 is 600. Therefore option “c” is correct.

Position:
Show:

Related questions

3 3 votes
3 3 answers
1.9k
1.9k views
srestha asked May 6, 2019
1,944 views
There is given a infix expression: ${\color{Red} {1}}$$A+B\times C/\left ( \left ( D+E \right )+F\times G \rig...
2 2 votes
1 1 answer
2.7k
2.7k views
Gupta731 asked Dec 7, 2018
2,684 views
Consider a stack S given below with elements 1,2,3 along with the usual operations push(), pop() and top() as shown.The number of elements that will remain in the stack a...
2 2 votes
2 2 answers
3.1k
3.1k views
jatin khachane 1 asked Dec 1, 2018
3,143 views
My doubt : What should we consider ^ operator as Bitwise XOR ? or Exponentiation
10 10 votes
0 0 answers
2.1k
2.1k views
MiNiPanda asked Jan 25, 2018
2,121 views
Given finite alphabet S = {A, B, C} and stack S of size 100. There are only three stack operations we can perform as mentioned below.Stack is initially empty and we do no...