Question:hard

How are the bits of the register PSW affected if we select Bank-2 of 8051?

Show Hint

Bank selection = RS1 RS0 → (PSW-4, PSW-3).
Updated On: Jul 2, 2026
  • PSW-5=0 and PSW-4=1
  • PSW-2=0 and PSW-3=1
  • PSW-3=1 and PSW-4=1
  • PSW-3=0 and PSW-4=1
Show Solution

The Correct Option is D

Solution and Explanation

Step 1: Recall how register banks map to PSW bits.
The 8051 uses two bits inside the PSW, called RS1 and RS0, to select which of the four register banks is currently active. RS1 physically sits at PSW-4 and RS0 sits at PSW-3.
Step 2: Write the bank number in binary.
Since there are four banks numbered 0 to 3, each one corresponds to a 2-bit binary code, bank 0 is $00$, bank 1 is $01$, bank 2 is $10$, and bank 3 is $11$.
Step 3: Read off the bits for bank 2.
Bank 2 corresponds to $RS1RS0 = 10$, so $RS1 = 1$ and $RS0 = 0$. Translating back to PSW bit positions, this means $PSW\text{-}4 = 1$ and $PSW\text{-}3 = 0$.
\[ \boxed{PSW\text{-}3 = 0 \text{ and } PSW\text{-}4 = 1} \]
Was this answer helpful?
0