Microprocessors

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

  1. hada

    Thread Starter Member

    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.



    :confused:

    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
    144
    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
    10,137
    1,786
    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

    Moderator

    Jan 28, 2005
    9,030
    214
    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

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
  7. scubasteve_911

    Senior Member

    Dec 27, 2007
    1,202
    1
    It doesn't? :p
    Steve
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,535
    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
    10,137
    1,786
    That is a charitable interpretation, but inconsistent with the OPs actual words.
     
  10. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
    144
    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
     
  12. hada

    Thread Starter Member

    Sep 24, 2008
    15
    0
    originally posted by veritas:


    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.


    yup u r right.i have to suppose for my assignment that its not available.n thankz to all ov u
     
Loading...