In: Computer Science
Convert 290.2 to binary
Since not provided, I am assuming that 290.2 is a decimal (base-10) number. I am going to convert this to binary with 12 decimal points.. Converting 290.2 to binary Convert decimal part first, then the fractional part > First convert 290 to binary Divide 290 successively by 2 until the quotient is 0 > 290/2 = 145, remainder is 0 > 145/2 = 72, remainder is 1 > 72/2 = 36, remainder is 0 > 36/2 = 18, remainder is 0 > 18/2 = 9, remainder is 0 > 9/2 = 4, remainder is 1 > 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 100100010 So, 290 of decimal is 100100010 in binary > Now, Convert 0.20000000 to binary > Multiply 0.20000000 with 2. Since 0.40000000 is < 1. then add 0 to result > Multiply 0.40000000 with 2. Since 0.80000000 is < 1. then add 0 to result > Multiply 0.80000000 with 2. Since 1.60000000 is >= 1. then add 1 to result > Multiply 0.60000000 with 2. Since 1.20000000 is >= 1. then add 1 to result > Multiply 0.20000000 with 2. Since 0.40000000 is < 1. then add 0 to result > Multiply 0.40000000 with 2. Since 0.80000000 is < 1. then add 0 to result > Multiply 0.80000000 with 2. Since 1.60000000 is >= 1. then add 1 to result > Multiply 0.60000000 with 2. Since 1.20000000 is >= 1. then add 1 to result > Multiply 0.20000000 with 2. Since 0.40000000 is < 1. then add 0 to result > Multiply 0.40000000 with 2. Since 0.80000000 is < 1. then add 0 to result > Multiply 0.80000000 with 2. Since 1.60000000 is >= 1. then add 1 to result > Multiply 0.60000000 with 2. Since 1.20000000 is >= 1. then add 1 to result > This is equal to 1, so, stop calculating 0.19999999999998863 of decimal is .001100110011 in binary so, 290.2 in binary is 10010001.001100110011 Answer: 10010001.001100110011