770 views
1 votes
1 votes
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 votes
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.

Related questions

2 votes
2 votes
2 answers
3
jatin khachane 1 asked Dec 1, 2018
1,275 views
My doubt : What should we consider ^ operator as Bitwise XOR ? or Exponentiation