Hexadecimal Multiplication using 2's complement

In summary, the problem is that because the negative numbers are multiplied together, the answer will be positive.
  • #1
Fatima Hasan
319
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
  • #2
what is D2 base 16 in decimal? Does it sound like the right answer for 3x15?
 
  • #3
phinds said:
what is D2 base 16 in decimal? Does it sound like the right answer for 3x15?
##2D_{16}##
 
  • #4
Fatima Hasan said:
##2D_{16}##
Did you not understand my question? What is that in DECIMAL base?
 
  • #5
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}##
 
  • #6
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)
 
  • #7
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
 
  • #8
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 ).
 
  • #9
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?
 

1. What is hexadecimal multiplication using 2's complement?

Hexadecimal multiplication using 2's complement is a method of multiplying two hexadecimal numbers that are represented in 2's complement form. This form is used to represent negative numbers in binary, and it allows for easier computation of arithmetic operations.

2. Why is 2's complement used in hexadecimal multiplication?

2's complement is used in hexadecimal multiplication because it simplifies the process of performing arithmetic operations on negative numbers. It also ensures that the result of the multiplication is accurate and can be easily converted back to hexadecimal form.

3. How is 2's complement calculated in hexadecimal multiplication?

To calculate 2's complement in hexadecimal multiplication, the first step is to convert both numbers to their binary form. Then, the binary numbers are added together, and if there is a carry, it is added back to the sum. The result is then converted back to hexadecimal form.

4. What are the advantages of using 2's complement in hexadecimal multiplication?

The main advantage of using 2's complement in hexadecimal multiplication is that it simplifies the process of performing arithmetic operations on negative numbers. It also allows for faster computation and more accurate results.

5. Are there any limitations to using 2's complement in hexadecimal multiplication?

While 2's complement is a useful tool in hexadecimal multiplication, it does have some limitations. It is not suitable for performing multiplication on numbers with a large number of digits, and it can also result in overflow errors if the result is larger than the maximum number that can be represented in the given number of bits.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
10K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
2K
  • Programming and Computer Science
Replies
3
Views
962
  • Engineering and Comp Sci Homework Help
Replies
2
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Back
Top