Convert Hexadecimal (12 bits, 2’s complement numbers) to Decimal 0x6FA = 0xE63 =
ID: 3744233 • Letter: C
Question
Convert Hexadecimal (12 bits, 2’s complement numbers) to Decimal
0x6FA =
0xE63 =
Explanation / Answer
1) 0x6FA => in binary it is => 011011111010 since left most bit is 0. It is positive. so, directly convert this binary into a decimal. 011011111010 = 2^10 + 2^9 + 2^7 + 2^6 + 2^5 +2^4 +2^3 + 2^1 = 1024 + 512 + 128 + 64 + 32 + 16 + 8 + 2 = 1786 so, 0x6FA is 1786 2) 0xE63 => in binary it is => 111001100011 since left most bit is 1, It is negative. Follow these steps to convert it to decimal. 1) Flip all bits(0's to 1 and 1's to 0) flip 111001100011 to 000110011100 2) Add 1 to the above result 000110011100 + 1 = 000110011101 3) convert above result to decimal 000110011101 => 2^8 + 2^7 + 2^4 + 2^3 + 2^2 + 2^0 => 256 + 128 + 16 + 8 + 4 + 1 => 413 so, 0xE63 is -413
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.