Why Does Multiplying 15 and -7 in Signed Binary Result in -105?

In summary, the reason for the incorrect answer is due to the incorrect definition of signed numbers. The correct solution is to add another MSB of -16 to the numbers and then perform the multiplication. This will result in the correct answer of -105.
  • #1
snoggerT
186
0
15X-7



The Attempt at a Solution



- 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.
 
Physics news on Phys.org
  • #2
Your problem is due to the way in which you have defined your numbers. When using signed numbers the MSB is actually -8.

So, 1111 = -8+(7) = -1 and 1001 = -8+(1) = -7.

To get the correct answer you need to add another MSB such that the MSB now equals -16.

Then, 01111 = 15 and 11001 = -16 +(9) = -7.

To do the multiplication;

01111 X 11001 = 15X(-16) + 15X9 = -105.
 
  • #3


Signed binary multiplication involves multiplying two binary numbers, taking into account their signed values. In this case, we have 15 and -7, which in binary form are 1111 and 1001 (using 2's complement for negative numbers).

To multiply these two numbers, we can use the following steps:

1. Start by multiplying the digits from right to left, just like in regular binary multiplication. In this case, we have 1x1, which gives us 1 as the rightmost digit of our answer.

2. For the next digit, we have 1x0, which gives us 0. However, since we are dealing with signed numbers, we need to also add the carry from the previous step, which is 1. This gives us a final value of 1 for the second digit.

3. For the third digit, we have 1x0, which gives us 0. Again, we need to add the carry from the previous step, which is 1. This gives us a final value of 1 for the third digit.

4. For the fourth and final digit, we have 1x1, which gives us 1. We also need to add the carry from the previous step, which is 1. This gives us a final value of 0 for the fourth digit.

5. Our final answer in binary form is 0111. However, this is not the correct answer since we are dealing with signed numbers. To get the correct answer, we need to convert this back to decimal form.

6. To convert from binary to decimal, we can use the following formula: (-1)^n x (2^n-1) x (binary number), where n is the number of digits in the binary number. In this case, n=4, so our formula becomes (-1)^4 x (2^4-1) x (0111), which gives us the final answer of -105.

Therefore, the signed binary multiplication of 15X-7 is -105.
 

Related to Why Does Multiplying 15 and -7 in Signed Binary Result in -105?

1. What is signed binary multiplication?

Signed binary multiplication is a mathematical operation used to multiply two numbers represented in binary form. It involves converting the numbers to their binary representation, then multiplying each digit and adding them together to get the final result.

2. How is signed binary multiplication different from regular binary multiplication?

Signed binary multiplication takes into account the sign of each number being multiplied, whereas regular binary multiplication only involves multiplying the absolute values of the numbers. This is important because it allows for negative numbers to be multiplied together.

3. What are the rules for signed binary multiplication?

The rules for signed binary multiplication are as follows:

  • Positive x Positive = Positive
  • Negative x Negative = Positive
  • Positive x Negative = Negative
  • Negative x Positive = Negative
Note that the sign of the result is determined by the number of negative operands involved.

4. How do you perform signed binary multiplication?

To perform signed binary multiplication, follow these steps:

  1. Convert each number to its binary representation.
  2. Multiply each digit of the second number by the first number, starting from the right.
  3. If there is a carry, add it to the next digit to the left.
  4. Add all the products together to get the final result.
  5. If the result is negative, convert it back to its signed binary representation.

5. What are some applications of signed binary multiplication?

Signed binary multiplication is commonly used in computer programming and electronic circuits to perform mathematical calculations involving both positive and negative numbers. It is also used in digital signal processing, cryptography, and other fields where binary numbers are used to represent data.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
29
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
120
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
11
Views
2K
Back
Top