• Support PF! Buy your school textbooks, materials and every day products Here!

Signed binary multiplication

  • Thread starter snoggerT
  • Start date
186
0
Perform the following operation in binary:

15X-7





3. 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.
 

Answers and Replies

Dick
Science Advisor
Homework Helper
26,258
618
You can't represent 105 in four bits. I'd suggest you use eight.
 
186
0
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?
 
Dick
Science Advisor
Homework Helper
26,258
618
Yes.
 
186
0
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?
 
Dick
Science Advisor
Homework Helper
26,258
618
You'll get the same answer both ways, but I think the point of the exercise is to show that.
 
186
0
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?
 
Dick
Science Advisor
Homework Helper
26,258
618
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.
 

Related Threads for: Signed binary multiplication

  • Last Post
Replies
11
Views
3K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
0
Views
1K
  • Last Post
Replies
8
Views
1K
Top