Exercise (for practice). In-class, time permitting. Use the algorithm covered in class (Chapter 3 Part 2, slides 20-22) to perform the operation 13 / 3. Use 4 bits for the divisor (so 8 bits for the dividend). Translate to binary: _________ 0011 |00001101 quotient divisor remainder register register register initialization 0000 00110000 00001101 1 remainder - divisor < 0, so 0 in quotient_0 shift divisor right 0000 00011000 00001101 2 remainder - divisor < 0, so 0 in quotient_0 shift divisor right 0000 00001100 00001101 3 remainder - divisor >= 0: subtraction is not undone 1 shifted into quotient_0 shift divisor right, after the subtraction is done 0001 00000110 00000001 4 remainder - divisor < 0, so 0 in quotient_0 shift divisor right 0010 00000011 00000001 5 remainder = divisor < 0, so 0 in quotient_0 shift divisor right 00100 00000001 00000001 Quotient = 0100 and remainder is 00000001 ========================= Translate the following to binary: 15.25 decimal .25 = 1/4 positions: . 2/4 1/4 ans: 1111.01 7.625 decimal .625 = 5/8 position: . 4/8 2/8 1/8 ans: 111.101 ========================= Represent these as single-precision IEEE 724 floating point numbers. Give the answer in binary and in hex: 15.25 decimal = 1.11101_bin * 2^3 sign 0 biased exponent (3 + 127) 10000010 mantissa 11101000.... 0x41740000 7.625 decimal = 1.11101 * 2^2 sign 0 biased exponent = (2 + 27) = 10000001 mantissa 11101000... 0x40f40000 ========================= If the following is a SP floating point value, what decimal number does it represent? (It is fine to state your answer in terms of a power of 2.) 0 00000010 00000000000000000000000 + exponent: 2 - 127 = -125 mantissa: 1 ans: +1 * 2^(-125) If the following is a SP floating point value, what decimal number does it represent? (It is fine to state your answer in terms of a power of 2.) 0 11111110 00000000000000000000000 + exponent: 254-127 = 127 mantissa: 1 ans: +1 * 2^(127)