1,106 views
1 votes
1 votes

How do I calculate (-54)10 in hexadecimal? The way I am doing it currently is that I am first converting (54)10 into hexadecimal which is (34)16. Next I am taking 16's complement. i.e. I am doing (FF)16 - (34)16 + 1, which comes to (CA)16. Thus, (-54)10 = (CA)16. Is this the right way to convert or is there some better method ?

1 Answer

Best answer
4 votes
4 votes

This is what I did

(54)10 in 8 bit binary is (00110110)2

(-54)10  in 2's complement representation is (11001010)2

Now form groups of 4 digits from LSB to MSB and it will represent equivalent hexadecimal digit as 4 digits in base 2 is one digit in base 16 $\because$ 24 = (16)1

$\therefore$ (1100 1010)2 = (CA)16

edited by

Related questions

3 votes
3 votes
1 answer
1
Lakshman Bhaiya asked Jan 5, 2018
1,706 views
The r ’s complement of an n-digit decimal number N in base r is defined for all values of N except for N = 0. If the given number is (247)9, then its 9’s complement w...
2 votes
2 votes
1 answer
2
Sourajit25 asked Oct 23, 2017
1,079 views
Consider the number given in the base '12' system is (-1457)12 then the number of 1's in the 2's complement binary representation of that number is ______?The answer is 9...
0 votes
0 votes
1 answer
3
Vishnathan asked Jun 28, 2018
691 views
A signed number in $2′s$ compliment notation with $16−$bit register $P=DFA0$What is the value of $P∗4$?I have tried $P∗4=0111111010000000$ but sign bit changed fr...
1 votes
1 votes
1 answer
4
saurabh rai asked Jan 17, 2018
1,141 views
What will be base-3 equivalent of decimal number 56.4