The GATE Grind

GATE 2015 CS (CS2) – Question 54

Computer Organization and Architecture · Instruction Set and Addressing Modes · 2 marks · Multiple choice

Memory is byte-addressable; PC, PSW and other registers are 2 bytes. An upward-growing stack starts at hexadecimal 0100 and SP points to its top element. SP currently equals hexadecimal 016E. A two-word CALL, fetched from PC=5FA0, pushes the current PC, then PSW, and loads the subroutine address into PC. Find SP after CALL.

  1. 016A₁₆
  2. 016C₁₆
  3. 0170₁₆
  4. 0172₁₆

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (D) 0172₁₆

Explanation

The CALL pushes two register values, each two bytes, so the upward-growing stack advances by four bytes. Starting at hexadecimal 016E, the new SP is 016E+4=0172. Thus D. The instruction’s own two-word length affects the return PC value, not how many register words are pushed.

More Instruction Set and Addressing Modes questions

All Instruction Set and Addressing Modes questions →