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

How many 16 bit registers are there in 8051?

The correct answer is

2

Understanding Registers in the 8051 Microcontroller

The 8051 microcontroller is a popular choice for embedded systems due to its architecture and integrated peripherals. It contains various registers, which are small storage locations within the CPU used to hold data or control information during program execution. These registers have different sizes, typically 8 bits or 16 bits.

Identifying 16-Bit Registers in 8051

The question asks specifically about the number of 16-bit registers available in the 8051 microcontroller. Let's look at the main registers and their sizes:

  • Accumulator (A): This is an 8-bit register used for most arithmetic and logic operations.
  • B Register: This is an 8-bit register often used with the accumulator for multiplication and division operations.
  • R0-R7 Registers: These are 8 general-purpose 8-bit registers that can be used for various data storage purposes. They are part of the register banks.
  • Program Status Word (PSW): This is an 8-bit register that contains status flags, such as carry, auxiliary carry, parity, and overflow.
  • Stack Pointer (SP): This is an 8-bit register that points to the current top of the stack in internal RAM.
  • Data Pointer (DPTR): This register is primarily used to access data in external memory. It is a 16-bit register, often treated as two 8-bit registers: DPH (Data Pointer High) and DPL (Data Pointer Low). However, it functions as a single 16-bit unit for addressing.
  • Program Counter (PC): This register holds the memory address of the next instruction to be fetched and executed. The 8051 has a 64 KB program memory space, requiring a 16-bit address. Therefore, the PC is a 16-bit register.

Counting the 16-Bit Registers

Based on the list above, the registers that are 16 bits in size are:

  1. Data Pointer (DPTR)
  2. Program Counter (PC)

Thus, there are 2 registers in the 8051 that are 16 bits wide.

Key 8051 Registers and Sizes
Register Size (Bits) Primary Function
A (Accumulator) 8 Arithmetic and Logic Operations
B 8 Multiplication, Division
R0-R7 8 (each) General Purpose
PSW 8 Status Flags
SP 8 Stack Pointer
DPTR (DPH, DPL) 16 (8+8) External Data Addressing
PC 16 Next Instruction Address

The question asks for the number of 16-bit registers, which are the DPTR and the PC. Therefore, there are 2 such registers.

Revision Table - 8051 Register Types

8051 Register Summary
Register Type Examples Size Quantity (this size)
8-bit A, B, R0-R7, PSW, SP 8 bits 1 (A) + 1 (B) + 8 (R0-R7) + 1 (PSW) + 1 (SP) = 12
16-bit DPTR, PC 16 bits 1 (DPTR) + 1 (PC) = 2

Additional Information - 8051 Architecture Details

Beyond the standard registers, the 8051 architecture includes:

  • Internal RAM: 128 bytes (or 256 bytes in some variants) used for data storage, stack, and special function registers (SFRs).
  • Special Function Registers (SFRs): These are memory-mapped registers controlling peripherals like timers, serial port, I/O ports, etc. Most SFRs are 8 bits, though some might be pairs of 8-bit registers functioning together (like the timer registers TL0/TH0, TL1/TH1). However, the question asks about *registers* in the sense of main CPU registers like PC and DPTR, not peripheral control registers which are part of the memory map.
  • Internal ROM/Flash: Program memory where instructions are stored. The size varies depending on the specific 8051 variant. The PC accesses this memory.
  • External Memory Interfaces: Ability to connect external RAM and ROM, addressed using DPTR and PC/address lines.

When discussing the core CPU registers and their typical sizes, the DPTR and PC are the two prominent 16-bit registers.

Was this answer helpful?

Important Questions from Microprocessors and Microcontrollers

  1. 16-bit registers consist of:

  2. 78xx series ICs are:

  3. In 8051 microcontroller the resultant of two numbers added is ________.

  4. For pulse generation, the IC used is:

  5. The Size of internal RAM of 8051 Microcontroller is?

Need Expert Advice?

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