The blog talks about variety of topics on Embedded System, 8085 microprocessor, 8051 microcontroller, ARM Architecture, C2000 Architecture, C28x, AVR and many many more. Also includes some projects that have been worked upon and also episodes to Embedded System Podcast.
Monday, July 25, 2011
Multiplying with 8 bit answer using loop in 8051
; program to multiply two numbers using loop answer is 8 bit
Basically we are multiplying 13 and 12 in hexadecimal. 13H * 12H = E4H 12 is added 13 times So ADD A # 12H does it once then we subtract the 13 counter check whether it is zero if not then we add again till the 13 in R0 becomes 0 Answer is stored in A
Can u explain the program
ReplyDeleteBasically we are multiplying 13 and 12 in hexadecimal.
Delete13H * 12H = E4H
12 is added 13 times
So ADD A # 12H does it once
then we subtract the 13 counter check whether it is zero if not then we add again till the 13 in R0 becomes 0
Answer is stored in A