In: Computer Science
D0 05 B1 49 in decimal notation and would like to see how the problem is worked out.
if it's an ip address, follow these steps: -------------------------------------------- a) => D0 => Dx16^1+0x16^0 => Dx16+0x1 => 13x16+0x1 => 208+0 => 208 D0 in decimal is 208 b) => 05 => 0x16^1+5x16^0 => 0x16+5x1 => 0x16+5x1 => 0+5 => 5 05 in decimal is 5 c) => B1 => Bx16^1+1x16^0 => Bx16+1x1 => 11x16+1x1 => 176+1 => 177 B1 in decimal is 177 d) => 49 => 4x16^1+9x16^0 => 4x16+9x1 => 4x16+9x1 => 64+9 => 73 49 in decimal is 73 Answer: 208.5.177.73 if it's two's decimal decimal use this: ---------------------------------------- first convert this hexadecimal to binary 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 hexadecimal to binary Converting D005B149 to binary D => 1101 0 => 0000 0 => 0000 5 => 0101 B => 1011 1 => 0001 4 => 0100 9 => 1001 So, in binary D005B149 is 11010000000001011011000101001001 convert this binary to two's complement since left most bit is 1, this number is negative number. so, follow these steps below to convert this into a decimal value. I. first flip all the bits. Flip all 0's to 1 and all 1's to 0. 11010000000001011011000101001001 is flipped to 00101111111110100100111010110110 II. Add 1 to above result 00101111111110100100111010110110 + 1 = 00101111111110100100111010110111 III. Now convert this result to decimal value Converting 101111111110100100111010110111 to decimal 101111111110100100111010110111 => 1x2^29+0x2^28+1x2^27+1x2^26+1x2^25+1x2^24+1x2^23+1x2^22+1x2^21+1x2^20+1x2^19+0x2^18+1x2^17+0x2^16+0x2^15+1x2^14+0x2^13+0x2^12+1x2^11+1x2^10+1x2^9+0x2^8+1x2^7+0x2^6+1x2^5+1x2^4+0x2^3+1x2^2+1x2^1+1x2^0 => 1x536870912+0x268435456+1x134217728+1x67108864+1x33554432+1x16777216+1x8388608+1x4194304+1x2097152+1x1048576+1x524288+0x262144+1x131072+0x65536+0x32768+1x16384+0x8192+0x4096+1x2048+1x1024+1x512+0x256+1x128+0x64+1x32+1x16+0x8+1x4+1x2+1x1 => 536870912+0+134217728+67108864+33554432+16777216+8388608+4194304+2097152+1048576+524288+0+131072+0+0+16384+0+0+2048+1024+512+0+128+0+32+16+0+4+2+1 => 804933303 Answer: -804933303 If it's a normal decimal representation use this: -------------------------------------------------- D005B149 => Dx16^7+0x16^6+0x16^5+5x16^4+Bx16^3+1x16^2+4x16^1+9x16^0 => Dx268435456+0x16777216+0x1048576+5x65536+Bx4096+1x256+4x16+9x1 => 13x268435456+0x16777216+0x1048576+5x65536+11x4096+1x256+4x16+9x1 => 3489660928+0+0+327680+45056+256+64+9 => 3490033993 Answer: 3490033993