Notices
Results 1 to 2 of 2

Thread: Binary multiplication

  1. #1 Binary multiplication 
    New Member
    Join Date
    Jan 2011
    Posts
    3
    1. The problem statement, all variables and given/known data

    i try to do multiplication of two's complement number. I'm using straightforward method, which
    give me wrong answer..

    i know i can't use this method.. but.. i just want to know why..
    why i can't use this method?



    3. The attempt at a solution
    1001 x 0101 = 0101101 which is 45.. it should be -35..


    Reply With Quote  
     

  2.  
     

  3. #2  
    Forum Freshman
    Join Date
    Feb 2011
    Posts
    15
    hey naspek

    Well first, you need to convert the Negatives to a Positive to do the arithmetic.

    1. NOT all of the bits to invert them : 0000 1001 becomes 0110
    2. ADD 1 : 0111

    so now you have positive 7. Do your multiplication against it, and get 35 0010 0011

    Now you need to convert that, using 2's compliment BACK

    1. NOT the bits 0010 0011 becomes 1101 1100
    2. Add 1 : 1101 1101

    That should be the Two's Compliment representation of -35.

    Hope that helps!


    Reply With Quote  
     

Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •