In: Computer Science
Convert the following unsigned numbers to the requested form:
Hex:
Decimal:
b) 136 decimal to: hex, and also binary
Hex:
Binary:
a) Hex: 0x61 Decimal: 97 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 01100001 to hexadecimal 0110 => 6 0001 => 1 So, in hexadecimal 01100001 is 0x61 Converting 01100001 to decimal 01100001 => 0x2^7+1x2^6+1x2^5+0x2^4+0x2^3+0x2^2+0x2^1+1x2^0 => 0x128+1x64+1x32+0x16+0x8+0x4+0x2+1x1 => 0+64+32+0+0+0+0+1 => 97 b) Hex: 0x88 Binary: 10001000 Divide 136 successively by 16 until the quotient is 0 136/16 = 8, remainder is 8 8/16 = 0, remainder is 8 Read remainders from the bottom to top as 88 Divide 136 successively by 2 until the quotient is 0 > 136/2 = 68, remainder is 0 > 68/2 = 34, remainder is 0 > 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 10001000 So, 136 of decimal is 10001000 in binary