GATE EC 2021 Set 1 — Question 42
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.MCQ+2 / -0.67EasyMachine Instructions & AddressingComputer OrganizationDigital Circuits
Digital Circuits → Computer Organization → Machine Instructions & Addressing
Last updated
Question
The content of the registers are R1 = 25H, R2 = 30H and R3 = 40H. The following machine instructions are executed.
After execution, the content of registers R1, R2, R3 are
PUSH{R1}
PUSH{R2}
PUSH{R3}
POP{R1}
POP{R2}
POP{R3}
After execution, the content of registers R1, R2, R3 are
Correct answer
(A) R1 = 40H, R2 = 30H, R3 = 25H
Solution
A stack is last-in, first-out (LIFO).
Final contents: R1 = 40H, R2 = 30H, R3 = 25H. R2 is unchanged because it pops the value it pushed.Answer: (A)
| Instruction | Stack (bottom to top) | Register changed |
|---|---|---|
| PUSH{R1} | 25H | |
| PUSH{R2} | 25H, 30H | |
| PUSH{R3} | 25H, 30H, 40H | |
| POP{R1} | 25H, 30H | R1 = 40H |
| POP{R2} | 25H | R2 = 30H |
| POP{R3} | (empty) | R3 = 25H |
Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE EC question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on Computer Organization
2026 Set 1 Q20In the circuit shown in the Figure, A and B are logic inputs and Y is the logic output. Which of…2026 Set 1 Q27A binary ripple counter is designed to count to . Which of the following…2026 Set 1 Q35The negative edge triggered JK flip-flop in the Figure has J and K inputs tied to Logic High and a…2026 Set 1 Q42The address of the first location of a 256 kilo byte (KB) memory is . Choose the correct…2026 Set 1 Q45What is the complement of ?