1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Signed binary multiplication

  1. Apr 1, 2008 #1
    Perform the following operation in binary:

    15X-7





    3. The attempt at a solution

    I tried getting help on the engineering board, but nobody has helped yet, so I figured I would try over here...

    - I can't seem to figure this one out for some reason. My first attempt, I used 1111(15)X1001(2's complement of 7), but I can't get the right answer. I believe that the answer should come out to be the 2's complement of 105 since the actual answer is -105, but I can't get that. Please help.
     
  2. jcsd
  3. Apr 1, 2008 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You can't represent 105 in four bits. I'd suggest you use eight.
     
  4. Apr 1, 2008 #3
    - so I would need to use 8 bits for both the 15 and the -7?
     
  5. Apr 1, 2008 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Yes.
     
  6. Apr 1, 2008 #5
    also, do I have to use the 2's complement of the -7, or can I use the magnitude and then take the 2's complement of the answer?
     
  7. Apr 1, 2008 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    You'll get the same answer both ways, but I think the point of the exercise is to show that.
     
  8. Apr 1, 2008 #7
    I tried multiplying 1111X0111 and got 1101001 (105) and then just added a 0 to it to get 01101001 (+105). I then took the 2's complement of that to get 10010111 which should be -105. Is that valid?
     
  9. Apr 1, 2008 #8

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    That's the right answer, but you didn't really do it the two's complement way. Now multiply the two's complement of 7 by 15 and see if you get the same thing. I don't really remember the details of all the bit fiddling required. If you can't get it, bump this and see if someone else can help.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Signed binary multiplication
  1. Binary operation (Replies: 5)

  2. Binary operations (Replies: 1)

  3. Binary Relations (Replies: 11)

  4. Binary Relations (Replies: 2)

Loading...