Convert the following HEX number into decimal numbers show t
Convert the following HEX number into decimal numbers (show the answers for all the three signed number representation i.e. Signed Magnitude, 1\'s complement, 2\'s complement and the number of bits are 8):
Solution
Ans)
A816 -------------Binary equivalent is 1010 1000 2
In sign-magnitude representation It uses one bit (usually the leftmost) to indicate the sign. \"0\" indicates a positive integer, and \"1\" indicates a negative integer. The rest of the bits are used for the magnitude of the number
As \'1\' in the left most bit number is negative
its magnitude is given by 010 1000 2 equivelent decimal is 25+23 =40
so decimal equivent is -40
-------------------------------------------------------------------------------------------
Assume given number is in 1\'s compliment form
As \'1\' in the left most bit number is negative
its magnitude is given by 1\'s compliment of number 010 1000 2 i.e
101 0111 2 = 26+24+22+21+20=87
So given number is -87
-----------------------------------------------
Assume given number is in 2\'s compliment form
As \'1\' in the left most bit number is negative
its magnitude is given by 2\'s compliment of number 010 1000 2 i.e
010 1000 2 -----1\'s compliment---101 0111 +1 = 101 1000
101 1000 2 = 26+24+23=88
So given number is -88
---------------------
if it is unsigned number its decimal equivalent is
A816 -------------Binary equivalent is 1010 1000 2---------decimal-----27+25+23=168

