Hexadecimal Multiplication using 2's complement

AI Thread Summary
The discussion revolves around performing hexadecimal multiplication using the 2's complement method, specifically calculating FFFFD_{16} * FFF1_{16}. The initial calculations led to confusion regarding the correct representation of the result, with D2_{16} being mistakenly referenced instead of 2D_{16}. The correct decimal conversion of the hexadecimal result was confirmed to be 45, which corresponds to 2D_{16}. Participants clarified the importance of distinguishing between D2 and 2D, ultimately agreeing that the multiplication should yield a positive result due to the signs of the operands. The conversation highlights the complexities of hexadecimal arithmetic and the need for precision in notation.
Fatima Hasan
Messages
315
Reaction score
14

Homework Statement


Perform the following operations using 2's complement method.
##FFFD_{16} * FFF1_{16}##

Homework Equations


-

The Attempt at a Solution


##FFFD_{16}## ----> (1's comp.) = ##0002_{16}## -----> (2's comp.) = ##0003_{16}##
##FFF1_{16}## ----> (1's comp.) = ##000E_{16}## -----> (2's comp.) = ##000F_{16}##
##0003_{16} * 000F_{16} = D2_{16} ##

But ##FFFD_{16} ## ( negative ) * ##FFF1_{16}## ( negative ) , so the answer should be positive .
The answer is ## = 0D2_{16}## (positive ) .
Could anyone check my answer please ?
 
Physics news on Phys.org
what is D2 base 16 in decimal? Does it sound like the right answer for 3x15?
 
phinds said:
what is D2 base 16 in decimal? Does it sound like the right answer for 3x15?
##2D_{16}##
 
Fatima Hasan said:
##2D_{16}##
Did you not understand my question? What is that in DECIMAL base?
 
phinds said:
Did you not understand my question? What is that in DECIMAL base?
##D2_{16} = 13 * 16 + 2 * 16^0 ##
## = 210 ##
It's not the right answer for 3*15 .
I tried to solve the problem again and this is my work :
## 3 * 15 = 45## in decimal which is equal to ##2D_{16} ##
So, ##FFFD_{16} ## ( negative ) * ##FFF1 ## (negative) = ##02D_{16}##
 
Fatima Hasan said:
##D2_{16} = 13 * 16 + 2 * 16^0 ##
## = 210 ##
It's not the right answer for 3*15 .
I tried to solve the problem again and this is my work :
## 3 * 15 = 45## in decimal which is equal to ##2D_{16} ##
So, ##FFFD_{16} ## ( negative ) * ##FFF1 ## (negative) = ##02D_{16}##
Yes, and can you do the actual arithmetic in base 16? (I wouldn't bother but I'm not sure if that's part of what you are supposed to do)
 
Fatima Hasan said:
I solved it again and I got ##2D_{16}## not ##D2_{16}##.
Yes, I deleted the post where I mistakenly said it 2D was wrong. I got the 2D confused with the D2
 
phinds said:
Yes, and can you do the actual arithmetic in base 16? (I wouldn't bother but I'm not sure if that's part of what you are supposed to do)
3 * F (15 in decimal) = 45 in decimal.
45 / 16 = 2.8125 ( 2 is the first digit , subtract 2 from 2.8125 and multiply the answer by 16 to get the second digit which is 13 in decimal ( D in base 16 ).
 
Fatima Hasan said:
3 * F (15 in decimal) = 45 in decimal.
45 / 16 = 2.8125 ( 2 is the first digit , subtract 2 from 2.8125 and multiply the answer by 16 to get the second digit which is 13 in decimal ( D in base 16 ).
No, I mean can you do the original problem FFFD*FFF1 IN HEX not in decimal. I don't know that it's a requirement of the problem, I'm just asking if you CAN do it. Anyway, I think I've given you what help I can with this problem so I'll bow out now.
 
  • #10
phinds said:
No, I mean can you do the original problem FFFD*FFF1 IN HEX

yes, but it's annoying and requires twice the register space and use of a rubber chicken to do it flat out instead of as complements.
 
  • Like
Likes phinds
  • #11
Fatima Hasan said:
But ##FFFD_{16} ## ( negative ) * ##FFF1_{16}## ( negative ) , so the answer should be positive .
The answer is ## = 0D2_{16}## (positive ) .
Could anyone check my answer please ?
Is this all solved now, Fatima Hasan? The only problem being that you have been writing D2 where you meant to write 2D?
 

Similar threads

Replies
2
Views
11K
Replies
8
Views
2K
Replies
17
Views
3K
Replies
4
Views
5K
Replies
2
Views
2K
Replies
3
Views
16K
Replies
4
Views
1K
Back
Top