This question was asked inGPSC Deputy Executive Engineer (Electrical) Class-2 Master Paper 2026Question 138 of 195 published · Gujarat Public Service CommissionOpen paper
Q138Easy8051 Microcontroller

8051 में स्टैक के संबंध में निम्नलिखित कथनों पर विचार कीजिए:
1. स्टैक LIFO सिद्धांत पर कार्य करता है।
2. PUSH स्टैक पॉइंटर बढ़ाता है।
3. POP स्टैक पॉइंटर घटाता है।
उपरोक्त में से कौन-सा/से कथन सही है/हैं?

उत्तर और चरणबद्ध हल
सही उत्तर: D. 1, 2 और 3
संक्षिप्त व्याख्या

D — 1, 2 और 3। 8051 स्टैक LIFO है और ऊपर की ओर बढ़ता है: PUSH पहले SP बढ़ाता है फिर डेटा लिखता है, POP डेटा पढ़कर SP घटाता है। रीसेट पर SP = 07H, इसलिए पहला PUSH 08H पर जाता है।

विस्तृत हल (मूल भाषा में)

Statement-wise Verification

  • Statement 1 - Correct.
    Stack operates on LIFO principle.
    Remember 07H for stack pointer reset.
  • Statement 2 - Correct.
    PUSH increases stack pointer.
    On reset the stack pointer is 07H, so the first PUSH stores at 08H.
  • Statement 3 - Correct.
    POP decreases stack pointer.
    Remember 07H for stack pointer reset.

Core Concept

The classic 8051 is an 8-bit Harvard-style microcontroller with separate code and data spaces. The standard core has 4 KB on-chip program ROM and 128 bytes internal RAM, supports external memory, multiple interrupts and configurable interrupt priority. On reset the stack pointer is 07H, so the first PUSH stores at 08H.

Formula / Key Relationship

Reset SP=07H; classic internal RAM=128 bytes; standard ROM=4 KB.

Why the Other Options Are Wrong

Option A is incorrect because it omits correct statement(s) 3. Option B is incorrect because it omits correct statement(s) 1. Option C is incorrect because it omits correct statement(s) 2.

Exam Shortcut / Approach

Remember 07H for stack pointer reset.

Common Mistake

00H is not the reset value of the 8051 stack pointer.

Quick Revision

PUSH POP and Stack Pointer is linked with Stack, 8051 Microcontroller and Microprocessors and Microcontrollers. Remember 07H for stack pointer reset.

Verified · SRO editorial desk Report
Try it before reading the solution — tap an option.0/1✓ 0✗ 0

More 8051 Microcontroller questions