In: Computer Science
2) Show 4 digits to the right of the radix point.
a) Convert 94.8710 to binary. Show your work.
b) Convert 101101.111 to decimal. Show your work.
a) Converting 94.87 to binary Convert decimal part first, then the fractional part > First convert 94 to binary Divide 94 successively by 2 until the quotient is 0 > 94/2 = 47, remainder is 0 > 47/2 = 23, remainder is 1 > 23/2 = 11, remainder is 1 > 11/2 = 5, remainder is 1 > 5/2 = 2, remainder is 1 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 1011110 So, 94 of decimal is 1011110 in binary > Now, Convert 0.87000000 to binary > Multiply 0.87000000 with 2. Since 1.74000000 is >= 1. then add 1 to result > Multiply 0.74000000 with 2. Since 1.48000000 is >= 1. then add 1 to result > Multiply 0.48000000 with 2. Since 0.96000000 is < 1. then add 0 to result > Multiply 0.96000000 with 2. Since 1.92000000 is >= 1. then add 1 to result 0.87 of decimal is .1101 in binary so, 94.87 in binary is 01011110.1101 Answer: 1011110.1101 b) 101101.111 => 1x2^5+0x2^4+1x2^3+1x2^2+0x2^1+1x2^0+1x2^-1+1x2^-2+1x2^-3 => 1x32+0x16+1x8+1x4+0x2+1x1+1x0.5+1x0.25+1x0.125 => 32+0+8+4+0+1+0.5+0.25+0.125 => 45.875 Answer: 45.875