search
Log In
0 votes
293 views
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)$
in DS 293 views
0
Option (C):
0
As there will not be any change in memory location 40 after the execution of the above set of instructions so option B) should also be true...

and memory location 600 contains 0XBF so C) is true.  

i.e. both B) & c) should be the correct Answers.
0
Since 0X88 is initially stored at memory location 500 then how will 0X88 move to 0X40.

Memory location 0X40 never stored 0X88

Please log in or register to answer this question.

Related questions

1 vote
2 answers
1
385 views
There is given a infix expression: ${\color{Red} {1}}$ $A+B\times C/\left ( \left ( D+E \right )+F\times G \right )$ While converting infix expression to postfix expression number of symbols in the stack at indicated ${\color{Red} {point-1}}$ infix expression (assume stack is initially empty) ______________ they told $5$, but is it correct? Can anyone give some explanation??
asked May 6, 2019 in DS srestha 385 views
1 vote
0 answers
2
232 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 after the parsing of the input string according to the above SDT rules is _______ I think the answer should be 5 but 4 is provided as answer.
asked Dec 7, 2018 in DS Gupta731 232 views
1 vote
1 answer
3
0 votes
1 answer
4
511 views
Consider the following statements: S1 : Implementation of stack using queue, deletion of second element from top of stack time complexity Ο(n), when insertion take Ο(1) time. S2 : In implementation of queue using stack, deletion of second element from front take Ο(1) ... take Ο(n) time. Both the statements are true. HOW? Kindly provide a detailed explanation. I am unable to solve such questions.
asked Jan 31, 2018 in DS _jerry 511 views
...