You are on page 1of 4

Mr Rajesh Kumar Misra

Asst.Professor
Dept of ECE ,CUTM

EXPERIMENT NO:-1
AIM:- Addition of 8 bit and 16 bit numbers.

Apparatus Required:- 8085 Microprocessor kit and power supply.

Theory:- Let us consider two 8 bit data 83H and 55H.Each of the data bytes may be
immediate(I) or Register(R) content or any of the memory(M) content. First of all one of the
byte is to be moved to accumulator and the second byte is available in either I or R or M
which is to be added with accumulator. The result is automatically loaded in accumulator.
The result may be needed to be stored in some memory location. If the result is more than
8 bit, the second byte of the result is to be stored in the subsequent memory location. In
case of 16 bit addition HL Register pair will behave like accumulator.

Program 1:- 8 bit addition without carry
Memory
Address
Machine
code
Mnemonics Operands Comments
8000H
8003H

8004H
8005H
8006H
8009H
21, 50, 80
7E

2E
86
32, 90, 80
76
LXI
MOV

INX
ADD
STA
HLT
H 8050H
A M

H
M
8090H
Copy the 8050H to HL pair
Copy the 8 bit data from the
memory
Increment of HL pair
(M) + (A) (A)
Store the sum in 8090H
Halt

Program 2:- 8 bit addition with carry
Memory
Address
Machine
code
Mnemonics Operands Comments
8000H
8003H
8005H

8006H
8007H
21, 50, 80
0E, 00
7E

23
86
LXI
MVI
MO

INX
ADD
H 8050H
C 00H
A M

H
M
Load HL pair with 9501H
Initializing Register C
Memory content pointed out
by HL pair is copied to Reg A
Increment HL pair
(A)+(M)A

Mr Rajesh Kumar Misra
Asst.Professor
Dept of ECE ,CUTM

8008H
800BH
800CH
D2, 0C, 8
0C
32, 90, 80
JNC
INR
STA
800BH
C
8090H
Jump to 800BH if CY=
Increment Reg C
Store the result in 8090H

Memory
Address
Machine
code
Mnemonics Mnemonics Comments
800FH
8010H

8013H
79
32, 91, 80

76
MOV
STA

HLT
A C
8091H

Copy C Reg content to Acc
Store carry bit at the address
8091H
Halt

Program 3:- 16 bit addition without carry
Memory
Address
Machine
code
Mnemonics Mnemonics Comments
8000H

8003H
8004H

8007H
8008H

800BH
21, 50, 80

EB
2A, 52, 80

19
22, 90, 80

76
LHLD

XCHG
LHLD

DAD
SHLD

HLT
8050H


8052H

D
8090H


Load HL pair with 16 bit data from
the given address
(HL)(DE)
Load HL pair with 16 bit data from
the given address
(HL) + (DE) (HL)
Store the result in Memory
location 8090H and 8091H
Halt

Program 4:- 16 bit addition with carry
Memory
Address
Machine
code
Mnemonics Mnemonics Comments
8000H

8003H
8004H

8007H
21, 50, 80

EB
2A, 52, 80

0E, 0
LHLD

XCHG
LHLD

MVI
8050H


8052H

C 00H
Load HL pair with 16 bit data from
the given address
(HL)(DE)
Load HL pair with 16 bit data from
the given address
Initialize reg C to 00H

Mr Rajesh Kumar Misra
Asst.Professor
Dept of ECE ,CUTM

8009H
800AH
800DH
800EH

19
D2, 0E, 80
0C
22, 90, 80

DAD
JNC
INR
SHLD

D
800EH
C
8090H

(HL) + (DE) (HL)
Jump to 800EH if C
Y
=0
Increment reg C
Store the result in Memory
location 8090H and 8091H

Memory
Address
Machine
code
Mnemonics Mnemonics Comments
8011H
8012H
8015H
79
32, 92, 80
76
MOV
STA
HLT
A C
8092H

(C) (A)
Store the carry bit in 8092H
Halt

Procedure:-
1. RESET
2. Memory Examined
3. Starting Address was entered i.e. 8000
4. Machine codes were entered
6. RESET GO 8000
7. Execute RESET
8. Exam memory - 8090, Result (LSB)
9. Next Result (MSB)

Observation 1:-
Augends: - 04H
Addend: - 05H
Result: - 09H 8090

Observation 2:-
Augends: - 98 H
Addend: - 9A H
Result: - 32H 8090H
01H 8091H



Mr Rajesh Kumar Misra
Asst.Professor
Dept of ECE ,CUTM

Observation 3:-
Augends: - 3725H
Addend: - 3724H
Result: - 6E49H will be stored in 8090H and 8091H

Observation 4:-
Augends: - 3725H
Addend: - F724H
Result: - 2E59H will be stored in 8090H and 8091H
01H (carry) will be stored in 8092H
Conclusion:- Addition was successfully performed using 8085 Microprocessor and results
were stored in memory locations and displayed.

You might also like