multiplication of two 8 – bit numbers using 8051

To perform multiplication of two 8 – bit numbers using 8051 instruction set.

ALGORITHM:
1. Get the data in A – reg.
2. Get the value to be multiplied in B – reg.
3. Multiply the two data
4. The higher order of the result is in B – reg.
5. The lower order of the result is in A – reg.
6. Store the results.

PROGRAM:
ORG 4100
CLR C
MOV A,#data1
MOV B,#data2
MUL AB
MOV DPTR,#4500
MOVX @DPTR,A
INC DPTR
MOV A,B
MOVX @DPTR,A
HERE: SJMP HERE

OBSERVATION:
Input: 80
80
Output: 00 (4500)
19 (4501)
multiplication of two 8 – bit numbers using 8051 multiplication of two 8 – bit numbers using 8051 Reviewed by enakta13 on August 24, 2012 Rating: 5

Search your question

Powered by Blogger.