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

In 8051, consider the following instructions: 

MOV PSW, #18H 

 MOV R3, #55H 

MOV A, R3. 
 

From which register bank is R3 selected in the instruction MOV A, R3?

The correct answer is

Bank 3

The 8051 keeps four banks of eight general-purpose registers (R0–R7), called Bank 0, Bank 1, Bank 2 and Bank 3, occupying internal RAM addresses 00H–1FH (8 bytes per bank). Only one bank is active at a time, and the active bank is chosen by two bits inside the Program Status Word (PSW): RS1 (bit 4) and RS0 (bit 3).

The instruction MOV PSW, #18H loads the PSW with 18H. Converting to binary:

Bit7654 (RS1)3 (RS0) 210
Value00011000

So RS1 = 1 and RS0 = 1. The bank-select mapping is: 00 → Bank 0, 01 → Bank 1, 10 → Bank 2, 11 → Bank 3. Since RS1 RS0 = 11, the active bank is Bank 3, whose registers live at addresses 18H–1FH; here R3 corresponds to address 1BH.

Therefore MOV R3, #55H writes 55H into R3 of Bank 3, and MOV A, R3 reads that same R3 from Bank 3. That is why the correct answer is Bank 3.

Why the other options are wrong:

  • Bank 0 would require RS1 RS0 = 00 (PSW value 00H), but the loaded value 18H sets both select bits to 1.
  • Bank 1 corresponds to RS1 RS0 = 01, and Bank 2 to RS1 RS0 = 10; neither matches the 11 pattern produced by 18H.
Was this answer helpful?

Similar Questions

  1. Which of the following statements about the Harvard architecture used in the 8051 microcontroller is correct?


Important Questions from Microprocessors

  1. What are the XTAL 1 and XTAL 2 pins numbers for 8051?

  2. Register which is used to store values of arithmetic and logical operations is termed:

  3. How many bytes of bit addressable memory is present in 8051 based microcontrollers?

  4. A single instruction to clear the lower four bits of the accumulator in 8085 assembly language is-

  5. In Microprocessor 8085 Address/Data buffer is a/an _______ buffer.

Need Expert Advice?
Test Series
RRB JE img
Railways
RRB JE Prev. Yr. Paper (CBT 1 + CBT 2) Test Series
290 Tests 5 Tests Free
4474 Attempts
4.3(88)
English

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