All Exams Test series for 1 year @ ₹349 only
Question

In the 8085 microprocessor, if SP = 3FFFH and memory contains: 

3FFEH = 20H, 

3FFFH = 20H, 

4000H = 10H, 

4001H = 10H.

 After executing POP H, what will be the contents of HL?

This question was previously asked in
RRB JE 2025 CBT 2 Mechanical and Allied Engg Question Paper English (2-Jul-2026) (Shift-1)
The correct answer is

1020H

This question tests how the stack operates in the 8085 microprocessor. The stack is a region of read/write memory that grows toward lower addresses, and the Stack Pointer (SP) always holds the address of the top of the stack (the last byte pushed). Data is stored in the 8085's usual little-endian order for register pairs: the lower-order byte occupies the lower address and the higher-order byte the next higher address.

The POP H instruction transfers two bytes from the top of the stack into the HL register pair and then adjusts SP. Its exact micro-sequence is:

  1. L ← memory[SP] = memory[3FFFH] = 20H (low byte goes into the low register L)
  2. SP is incremented: SP ← SP + 1 = 4000H
  3. H ← memory[SP] = memory[4000H] = 10H (high byte goes into the high register H)
  4. SP is incremented again: SP ← SP + 1 = 4001H

Combining the two bytes with H as the most-significant byte: HL = H:L = 10H:20H = 1020H. This is the correct answer, and SP finishes at 4001H.

Why the others are wrong:

  • 2010H reverses the byte order — it would place the first byte popped (20H) into H and the second (10H) into L, which contradicts the little-endian rule that the byte at the lower address becomes L.
  • 2020H would result only if both bytes read were 20H, i.e. from addresses 3FFEH and 3FFFH. But POP starts at SP = 3FFFH, so the byte at 3FFEH is never touched; it would matter only if SP had been 3FFEH.
  • 1010H would require both bytes to be 10H (from 4000H and 4001H), which would be the case only if SP had started at 4000H, not 3FFFH.
Was this answer helpful?

Similar Questions

  1. In the 8085 microprocessor, what happens to the Stack Pointer after execution of PUSH instruction?


Important Questions from Architecture of 8085

  1. In an 8085 microprocessor, which one of the following instructions changes the content of the accumulator?

  2. Which stack is used in 8085 microprocessors?

  3. 8085 MPU is

  4. In the 8085 microprocessor, what happens to the Stack Pointer after execution of PUSH instruction?

  5. In an 8085 microprocessor, the contents of the accumulator and the carry flag are A7 (in hex) and 0, respectively. If the instruction RLC is executed, then the contents of the accumulator (in hex) and the carry flag, respectively, will be
Need Expert Advice?
Test Series
RRB JE img
Railways
RRB JE (CBT 1 + CBT 2) 2026 Mock Test Series
1509 Tests 19 Tests Free
1181 Attempts
4.4(137)
English, Hindi

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App