Two's Complement Binary Multiplication: Understanding Why it Works

In summary, when multiplying two's complement numbers, it is important to extend each number to double the number of bits and consider only the first 8 bits of the result. This can be done by adding extra 1s in the start for negative numbers and extra 0s for positive numbers. This method may seem straightforward, but it will give incorrect results if not done correctly. More information on this can be found in the section for multiplication on the Wikipedia page for two's complement.
  • #1
naspek
181
0

Homework Statement

hey guys...
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?

The Attempt at a Solution


1001 x 0101 = 0101101 which is 45.. it should be -35..
 
Physics news on Phys.org
  • #2
When you do multiplication you have to extend each number to double the number of bits by adding extra 1s in the start for negative numbers, or extra 0s for positive numbers. So the above multiplication should be 11111001x00000101 and at the result you consider only the first 8 bits. So in this case would be 11011101 which is -35.

For more info check http://en.wikipedia.org/wiki/Two's_complement , towards the end of page the section for multiplication.
 

Related to Two's Complement Binary Multiplication: Understanding Why it Works

What is Two's Complement Binary Multiplication?

Two's Complement Binary Multiplication is a mathematical operation used to multiply two numbers in binary form. It is based on the principles of Two's Complement, which is a method of representing negative numbers in binary.

Why is Two's Complement Binary Multiplication used?

Two's Complement Binary Multiplication is used because it allows for the multiplication of both positive and negative numbers in binary form, making it a more versatile and efficient method compared to other binary multiplication techniques.

How does Two's Complement Binary Multiplication work?

Two's Complement Binary Multiplication works by first converting the numbers to their Two's Complement form, then performing the multiplication using the standard rules of binary multiplication. The result is then converted back to its original form if necessary.

What are the benefits of using Two's Complement Binary Multiplication?

One major benefit of Two's Complement Binary Multiplication is that it is a simpler and more efficient method compared to other binary multiplication techniques. It also allows for the multiplication of both positive and negative numbers without the need for separate algorithms.

Are there any drawbacks to using Two's Complement Binary Multiplication?

One potential drawback of Two's Complement Binary Multiplication is that it can lead to overflow or underflow of the resulting number if the operands are too large or too small. This can be mitigated by using larger binary numbers or by using a larger word size.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
Back
Top