Addressing Modes Of 8051/8031 Microcontroller

•    Every instruction of a program has to operate on data.

•    The method of specifying the data to be operated by the instruction is called addressing.

•    The 8031 has the following types of addressing.

1.    Immediate Addressing

2.    Direct Addressing

3.    Register Addressing

4.    Register Indirect Addressing

5.    Implied Addressing

6.    Relative Addressing


In immediate addressing mode, an 8/16 bit immediate data/constant is specified in the instruction itself.

MOV A, #6CH:- Move the immediate data 6CH given in the instruction to A-register.

MOV DPTR, #0100H:- Load the immediate 16-bit constant given in the instruction in DPTR (Data pointer). This constant will be an address of data memory location.


In direct addressing mode, the address of the data is directly specified in the instruction.
The direct address can be the address of an internal data RAM location (00H to 7FH) or the address of a special function register (80H to FFH).

MOV A, 07 H:- The address of the R7 register of bank-0 is 07. This instruction will move the content of the R7 register to A-register (Accumulator).


In register addressing mode, the instruction will specify the name of the register in which data is available.

MOV R2, A:- The content of A-register (accumulator) is moved to register R2.


In this mode, the instruction specifies the name of the register in which the address of the data is available. The internal data RAM locations (00H to 7FH) can be addressed indirectly through registers R1 and R0. The external RAM can be addressed indirectly through DPTR.

MOV A, @R0:- The internal RAM Location R0 holds the address of data. The content of the RAM location addressed by R0 is moved to A-register (Accumulator).


In implied addressing mode, the instruction itself specifies the data to be operated by the instruction.
CPL C:- Complement carry flag.


In relative addressing mode, the instruction specifies the address relative to the program counter.
The instruction will carry an offset whose range is -l2810 to +l2710.
The offset is added to the PC to generate the 16-bit physical address.

JC Offset:- If carry is one then the program control jumps to an address obtained by adding the content of the program counter and offset value in the instruction.

Aanchal Gupta

Welcome to my website! I'm Aanchal Gupta, an expert in Electrical Technology, and I'm excited to share my knowledge and insights with you. With a strong educational background and practical experience, I aim to provide valuable information and solutions related to the field of electrical engineering. I hold a Bachelor of Engineering (BE) degree in Electrical Engineering, which has equipped me with a solid foundation in the principles and applications of electrical technology. Throughout my academic journey, I focused on developing a deep understanding of various electrical systems, circuits, and power distribution networks.

Leave a Reply