Given the following binary string 01001001 01110011 01101110
Given the following binary string: 01001001 01110011 01101110 00100111 01110100 00100000 01000001 01110011 01110011 01100101 01101101 01100010 0110110001111001 00100000 01000110 01110101 01101110 00111111 00000000 (a) Convert it to a hexadecimal string. (b) Convert the first four bytes to a string of base ten numbers. (c) Convert the first (little-endian) halfword to base ten. (d) Convert the first (big-endian) half word to base ten. (e) If this string of bytes were sent to an ASCII printer or terminal, what would be printed?
Solution
a) Hexadecimal string will be:
49 73 6E 27 74 20 41 73 73 65 6D 62 6C 79 20 46 75 6E 3F 00
b.) first 4 bytes are: 01001001 01110011 01101110 00100111
in base ten: 73 115 110 39
c.) first halfword in liitle endian format (in hexadecimal): 49 73 6E 27 74 20 41 73 73 65
equivalent base ten format will be: 73 115 110 39 116 32 65 115 115 101
d.) In big-endian format, first MSB store into memory. So, big-endian(in byte format) format is:
65 73 73 41 20 74 27 6E 73 49
in base ten: 101 115 115 65 32 116 110 115 73
Hope it helps.
