0% found this document useful (0 votes)
78 views1 page

Write Up 8051 Addition

Uploaded by

Vedant Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views1 page

Write Up 8051 Addition

Uploaded by

Vedant Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment No.

– 6
Title: Addition of Two 8-bit numbers

Aim: Write an 8051 Microcontroller program for Addition/Subtraction of two 8 and 16-bit numbers
(Using Registers & Memory).

Objective: i) To perform arithmetic operations using 8051 (Edsim51 Simulator)


ii) To learn internal memory access of 8051

Theory:
Explain the instruction / Assembler directive and Identify Addressing mode
● Mov a, @R0

● mov r0, #40h

● add a, @r0

● djnz r3, back

● org 0000h

Algorithm:
Write the algorithm for addition of Two 8 bit and 16 bit numbers stored in internal RAM
Input: Two 8 bit numbers stored in any internal RAM location.
Output: Result of addition of Two 8 bit numbers stored in any register R0 to R7.
Conclusion: Internal memory accesses are studied by performing addition of 8 bit numbers stored in
internal memory

FAQs:

1) What is the difference between the following two instructions in terms of addressing mode and
function performed?
MOV A, #46H, MOV A, 46H
2) What address is assigned to register A and B?
3) Differentiate between Microprocessor and Microcontroller.
4) Explain DJNZ with examples.
References:
1. Ayala,” The 8051 Micro Controller 3rd Edition”, IE
2. Mazidi M. Gillipse J. “The 8051 Microcontroller and Embedded Systems”, Pearson
Education, 2002, ISBN-81-7808-574-7

You might also like