1. We will be in Read Only mode (no new threads, replies, registration) for several hours as we migrate the forums to upgraded software.

# Microprocessors

Discussion in 'Homework Help' started by hada, Sep 27, 2008.

Sep 24, 2008
15
0
hi,
i have a big problem fromwhat i see,i have been given a task to make a code.i have to suppose that multiply operation is not available on 8086/8088 microprocessors and by using all of the rest operations make a code to multiply two numbers.

can any one have a idea how to do it.i tried it by adding any the series of numbers.
n please recommend a good book on digital communication systems.i have tried but proakis book is not available.
thanks

2. ### Dave Retired Moderator

Nov 17, 2003
6,960
172
If you have two numbers, x and y, you can multiply these by adding x to itself y-times (or conversely add y to itself x-times).

Eg: 3 x 4 = > 3 + 3 + 3 + 3 => 4 + 4 + 4

Dave

3. ### Papabravo Expert

Feb 24, 2006
12,285
2,724
The 8086 does have a multiply instruction.

In any number base you can multiply by shifting and adding. In binary it is actually fairly efficient and the exection time does not depend on the magnitude of either operand.

4. ### hgmjr Retired Moderator

Jan 28, 2005
9,029
219
Page 7 in the tutorial at this link describes the IMUL instruction.

hgmjr

5. ### veritas Active Member

Feb 7, 2008
167
0
I think he means that he knows the multiply op exists on the 8086, but he can't USE it for the assignment. Adding or shifting/adding, as suggested, will work for this.

6. ### hgmjr Retired Moderator

Jan 28, 2005
9,029
219
Your interpretation may be correct but in the introductory post of this thread the statement does not clearly state this to be the case.

hgmjr

Dec 27, 2007
1,202
1
It doesn't?
Steve

8. ### Wendy Moderator

Mar 24, 2008
21,838
3,047
Basically we're talking about a simple loop by X times. This is fairly basic if you approach it as such.

9. ### Papabravo Expert

Feb 24, 2006
12,285
2,724
That is a charitable interpretation, but inconsistent with the OPs actual words.

10. ### hgmjr Retired Moderator

Jan 28, 2005
9,029
219
I, for one, look forward to getting a clarification of the original question when she/he returns.

hgmjr

11. ### Dave Retired Moderator

Nov 17, 2003
6,960
172
I must say, this is how I interpret the OP. The word that gestures towards this is "suppose" when referring to the availability of the multiply operation.

My interpretation is that this homework question is looking at using loading registers with values and using adding (and shifting) along with GOTO and BRANCH statements to implement a simple multiply operation.

Dave