9-Arithmetic Instructions and Pin Diagram-17!01!2024
9-Arithmetic Instructions and Pin Diagram-17!01!2024
Lecture 8
Arithmetic Instructions
Instructions :
1. Addition
2. Subtraction
3. Increment
4. Decrement
5. Multiplication
6. Division
7. Decimal Adjustment
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
1. Addition Instruction
❖ ADD
❖ ADDC
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
1. Addition Instruction
❖ ADD : it will add accumulator data with 8 bit and stores result into A
Example :
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
1. Addition Instruction
❖ ADD : it will add accumulator data with 8 bit and stores result into A
Example :
ADD A , R1 ; A: A+R1
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
1. Addition Instruction
❖ ADD : it will add accumulator data with 8 bit and stores result into A
Example :
ADD A , R1 ; A: A+R1
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
1. Addition Instruction
❖ ADD : it will add accumulator data with 8 bit and stores result into A
Example :
ADD A , R1 ; A: A+R1
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
1. Addition Instruction
❖ ADDC : it will add accumulator data with 8 bit along with carry and
Example :
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
1. Addition Instruction
❖ ADDC : it will add accumulator data with 8 bit along with carry and
Example :
2. Subtraction Instructions
❖ SUBB : it will sub accumulator data with 8 bit along with carry and
Example :
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
2. Subtraction Instructions
❖ SUBB : it will sub accumulator data with 8 bit along with carry and
Example :
3. Increment Instructions
Example :
INC A ;A : A+1
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
3. Increment Instructions
Example :
INC A ;A : A+1
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
3. Increment Instructions
Example :
INC A ;A : A+1
4. Decrement Instructions
Example :
DEC A ;A : A-1
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
4. Decrement Instructions
Example :
DEC A ;A : A-1
5. Multiplication Instructions
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
5. Multiplication Instructions
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
6. Division Instruction
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
6. Decimal Adjustment Instruction-- DA A :
Few Attributes of DA :
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
6. Decimal Adjustment Instruction-- DA A :
Few Attributes of DA :
Example
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
6. Decimal Adjustment Instruction-- DA A :
Few Attributes of DA :
Example
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
6. Decimal Adjustment Instruction-- DA A :
Few Attributes of DA :
Example
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
6. Decimal Adjustment Instruction-- DA A :
Few Attributes of DA :
Example
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
6. Decimal Adjustment Instruction-- DA A :
Few Attributes of DA :
Example
Dr Vikas Vijayvargiya
8051 Addressing
Arithmetic modes
Instructions of 8051
6. Decimal Adjustment Instruction-- DA A :
Few Attributes of DA :
Example
Dr Vikas Vijayvargiya