English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How do i multiply 2 8bit no's in 8085 using repeated addition method ?
I got some idea by a previous answer but how will i write a program if i hve to multiply F2(H)*24(H) ? H is hexadecimal .

2007-11-21 00:41:43 · 1 answers · asked by Devil 4 in Science & Mathematics Engineering

1 answers

Consider 4 x 3 = 12

I can add three, four times 3+3+3+3 = 12
or add four, thre times 4+4+4 = 12

You can do this in a loop and how you program the loop is up to you. You can use another variable as a loop counter and count passes through the loop incremening the count for each pass and comparing the counter value to one of the multiicand values while adding the other to a summation each pass.

The example on the link below uses subtraction to decrement one of the multiplicands as the other is totalized. This method can use a branch not zero to drop out of the loop when the value of the decremented ounter is zero.

Basically these methods are doing the same thing its just a matter of how you keep track of how many passes through the loop have been done.

2007-11-21 01:47:30 · answer #1 · answered by MarkG 7 · 0 0

fedest.com, questions and answers