You are on page 1of 6

Exp.No.

: 1 Date:12-01-2024

Arithmetic Operations Using 8051

By Rajesh Mandi (21BEE0063)

Aim:
To perform all the arithmetic operations, namely, addition, subtraction, multipli-
cation, and division with the help of assembly on hexadecimal numbers using Keil uVision
software.

Program:
1. Addition:
MOV A, # 04h
MOV B, # 02h
ADD A,B
JNCL
INC R0
L:
END
Input:
A = 04H
B = 02H

Output:
A = 06H

Input:2
A = 0FFH
B = 0FFH

Output:2
A = 0FEH
R0= 01H

1
2. Subtraction:
MOV A, # 07h
MOV B, # 05h
SUBB A,B

Input:
A = 0x07
B = 0x05

Output:
A = 0x02
B = 0x05

3. Multiplication:
MOV A, # 04H
MOV B, # 02H
MUL AB

Input:1
A = 04H
B = 02H

Output:1
A = 08H
B = 00H
Input:2
A = 0FFH
B = 0FFH

Output:2
A = 01H
B = 0FEH

4. Division:
MOV A, # 04h
MOV B, # 02h
DIV AB

Input:1

2
A = 04H
B = 02H

Output:1
B = 00H
Input:2
A = 08H
B = 03H

Output:2
A = 02H
B = 02H

3
4
5
Result:
We sucessfully performed all the arthimatic operation and get the desired value.

You might also like