Binary Multiplication with Signed Numbers: Solving 15X-7

Click For Summary

Homework Help Overview

The discussion revolves around performing binary multiplication involving signed numbers, specifically calculating the expression 15X-7. Participants are exploring the representation of numbers in binary and the use of two's complement for negative values.

Discussion Character

  • Exploratory, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the need for adequate bit representation for the numbers involved, questioning whether to use four or eight bits. There is also a debate on the method of using two's complement versus magnitude for negative numbers.

Discussion Status

Some participants have provided guidance on the bit representation needed for the numbers, while others are exploring different methods of multiplication and the implications of using two's complement. There is no explicit consensus yet, as various interpretations of the problem are being examined.

Contextual Notes

Constraints include the requirement to represent the numbers in binary and the specific focus on signed multiplication using two's complement. The original poster expresses difficulty in achieving the correct result, indicating a potential gap in understanding the binary operations involved.

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 1 ·
Replies
1
Views
1K
  • · 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