Binary Multiplication with Signed Numbers: Solving 15X-7

Click For Summary
The discussion revolves around performing binary multiplication for the expression 15X-7. Participants emphasize the necessity of using eight bits for both numbers due to the limitation of representing 105 in four bits. The correct approach involves using the two's complement for -7, and while one user attempts to multiply using a different method, they ultimately confirm that the two's complement method yields the correct result of -105. There is a suggestion to multiply the two's complement of 7 by 15 to verify the answer. The conversation highlights the importance of understanding binary representation and two's complement in solving such problems.
snoggerT
Messages
183
Reaction score
0
Perform the following operation in binary:

15X-7





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.
 
Physics news on Phys.org
You can't represent 105 in four bits. I'd suggest you use eight.
 
Dick said:
You can't represent 105 in four bits. I'd suggest you use eight.

- so I would need to use 8 bits for both the 15 and the -7?
 
Yes.
 
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?
 
You'll get the same answer both ways, but I think the point of the exercise is to show that.
 
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?
 
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.
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
17K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K