In: Computer Science
represent 8912 in 16-bit binary format and then convert it to Hexadecimal form.
Since this is a positive number. we can directly convert this into binary
Divide 8912 successively by 2 until the quotient is 0
> 8912/2 = 4456, remainder is 0
> 4456/2 = 2228, remainder is 0
> 2228/2 = 1114, remainder is 0
> 1114/2 = 557, remainder is 0
> 557/2 = 278, remainder is 1
> 278/2 = 139, remainder is 0
> 139/2 = 69, remainder is 1
> 69/2 = 34, remainder is 1
> 34/2 = 17, remainder is 0
> 17/2 = 8, remainder is 1
> 8/2 = 4, remainder is 0
> 4/2 = 2, remainder is 0
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10001011010000
So, 8912 of decimal is 10001011010000 in binary
Adding 2 zeros on left hand side of this number to make this of length 16
so, 8912 in 2's complement binary is 0010001011010000
Hexadecimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Use this table to convert from binary to hexadecimal
Converting 0010001011010000 to hexadecimal
0010 => 2
0010 => 2
1101 => D
0000 => 0
So, in hexadecimal 0010001011010000 is 0x22D0
Answer: 0x22D0