Microprocessors Questions and Answers – Stack

This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on “Stack”.

1. The Stack follows the sequence
a) first-in-first-out
b) first-in-last-out
c) last-in-first-out
d) last-in-last-out
View Answer

Answer: c
Explanation: The stack follows last-in-first-out sequence.

2. If the processor is executing the main program that calls a subroutine, then after executing the main program up to the CALL instruction, the control will be transferred to
a) address of main program
b) subroutine address
c) address of CALL instruction
d) none of the mentioned
View Answer

Answer: b
Explanation: Since subroutine is called, to start the execution of the subroutine, the control is transferred to the subroutine address.

3. The stack is useful for
a) storing the register status of the processor
b) temporary storage of data
c) storing contents of registers temporarily inside the CPU
d) all of the mentioned
View Answer

Answer: d
Explanation: Stack is used for temporary storage of contents of registers and memory locations, status of registers.
advertisement
advertisement

4. The Stack is accessed using
a) SP register
b) SS register
c) SP and SS register
d) None of the mentioned
View Answer

Answer: c
Explanation: The stack is accessed using a pointer that is implemented using SP and SS registers.

5. As the storing of data words onto the stack is increased, the stack pointer is
a) incremented by 1
b) decremented by 1
c) incremented by 2
d) decremented by 2
View Answer

Answer: d
Explanation: The data is stored from top address of the stack and is decremented by 2.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. While retrieving data from the stack, the stack pointer is
a) incremented by 1
b) incremented by 2
c) decremented by 1
d) decremented by 2
View Answer

Answer: b
Explanation: The data in the stack, may again be transferred back from a stack to register. At that time, the stack pointer is incremented by 2.

7. The process of storing the data in the stack is called ……… the stack.
a) pulling into
b) pulling out
c) pushing into
d) popping into
View Answer

Answer: c
Explanation: The data is pushed into the stack while loading the stack.
advertisement

8. The reverse process of transferring the data back from the stack to the CPU register is known as
a) pulling out the stack
b) pushing out the stack
c) popping out the stack
d) popping off the stack
View Answer

Answer: d
Explanation: The data retrieved from stack is called popping off.

9. The books arranged one on the other on a table is an example of
a) queue
b) queue and first-in-first out
c) stack
d) stack and last-in-first-out
View Answer

Answer: d
Explanation: If the books are arranged one on the other, then the book that is placed last will be the first out.
advertisement

10. The PID temperature controller using 8086 has
a) data flow
b) data flow and uses queue
c) sequential flow
d) sequential flow and uses stack
View Answer

Answer: d
Explanation: Since PID temperature controller has steps that need to be sequentially executed such as sampling the output, conversion of a signal with ADC, finding errors, deriving control signals and applying the control signal to control flow of energy.

Sanfoundry Global Education & Learning Series – Microprocessors.

Here’s the list of Best Books in Microprocessors.

To practice all areas of Microprocessors, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.