1. Limited time only! Sign up for a free 30min personal 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!

Multiplying two N bit signed numbers together

  1. Sep 3, 2012 #1
    1. The problem statement, all variables and given/known data

    Determine the number of bits needed to represent the range of results obtained when two N bit signed numbers are multiplied together.

    2. Relevant equations


    3. The attempt at a solution

    I considered the case when N = 3, i.e. a 3 bit signed number. The values that can be expressed with this are +3 - > -4. Hence with two 3 bit signed numbers we can get a maximum positive number of +16 and a maximum negative number of -12. We would therefore need 6 bits to represent this range of results (2N).

    Looking at the case of 4 bits, the values that can be expressed are +7 -> -8. Here our largest positive number would be 64 and largest negative number -56. We would therefore need 8 bits (2N).

    So my answer is 2N, is this correct ?
  2. jcsd
  3. Sep 3, 2012 #2


    User Avatar
    Gold Member

    For 2's complement, this is true. For sign-magnitude, one less so.
  4. Sep 3, 2012 #3
    That's pretty much the same thing that's bothering me... I have written the question as it has been asked. I'm assuming they mean sign magnitude ?
  5. Sep 3, 2012 #4


    User Avatar
    Gold Member

    I suggest clarify question with instructor or state your assumptions in the answer. If you can't do that and if it is one of these computer-based answer entry systems (no assumptions permitted) I'd go with 2N. It allows you to do both.
  6. Sep 3, 2012 #5


    User Avatar
    Homework Helper

    Or ones complement. For 3 bit sign-magnitude or one's complement numbers the range of products is limited to -9 to +9, which only requires 5 bits.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Multiplying two N bit signed numbers together