Multiplying two N bit signed numbers together

  • Thread starter Thread starter bd411
  • Start date Start date
  • Tags Tags
    Bit Numbers
Click For Summary
SUMMARY

The discussion focuses on determining the number of bits required to represent the results of multiplying two N bit signed numbers. It concludes that for 2's complement representation, the required bit count is 2N, while for sign-magnitude or one's complement, it is slightly less. For example, with 3-bit signed numbers, the maximum positive product is +16, necessitating 6 bits, whereas with 4 bits, the maximum positive product is +64, also requiring 8 bits. The analysis emphasizes the importance of clarifying the representation method used in the calculations.

PREREQUISITES
  • Understanding of signed number representations (2's complement, sign-magnitude, one's complement)
  • Basic knowledge of binary arithmetic
  • Familiarity with bit representation and limits of binary numbers
  • Concept of overflow in binary multiplication
NEXT STEPS
  • Research the differences between 2's complement and sign-magnitude representations
  • Learn about binary multiplication techniques and their implications on bit requirements
  • Explore the concept of overflow in binary arithmetic
  • Study the effects of varying bit sizes on signed number calculations
USEFUL FOR

This discussion is beneficial for computer science students, software engineers, and anyone interested in understanding binary arithmetic and signed number representations in computing.

bd411
Messages
39
Reaction score
0

Homework Statement



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


Homework Equations



None.

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 ?
 
Physics news on Phys.org
For 2's complement, this is true. For sign-magnitude, one less so.
 
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 ?
 
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.
 
lewando said:
For 2's complement, this is true. For sign-magnitude, one less so.
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.
 

Similar threads

Replies
9
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
10
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 12 ·
Replies
12
Views
9K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
19K