In: Computer Science
Represent -32.5010 in the simple model.
1 10101 10000010 Explanation: ------------- -32.5 Converting 32.5 to binary Convert decimal part first, then the fractional part > First convert 32 to binary Divide 32 successively by 2 until the quotient is 0 > 32/2 = 16, remainder is 0 > 16/2 = 8, remainder is 0 > 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 100000 So, 32 of decimal is 100000 in binary > Now, Convert 0.50000000 to binary > Multiply 0.50000000 with 2. Since 1.00000000 is >= 1. then add 1 to result > This is equal to 1, so, stop calculating 0.5 of decimal is .1 in binary so, 32.5 in binary is 00100000.1 -32.5 in simple binary => 100000.1 so, -32.5 in normal binary is 100000.1 => 0.1000001 * 2^6 14-bit format: -------------------- sign bit is 1(-ve) exponent bits are (15+6=21) => 10101 Divide 21 successively by 2 until the quotient is 0 > 21/2 = 10, remainder is 1 > 10/2 = 5, remainder is 0 > 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 10101 So, 21 of decimal is 10101 in binary frac/significant bits are 10000010 so, -32.5 in 14-bit format is 1 10101 10000010