Question: >>> def convert float binary (n): ** Your Code ** >>> convert_float_binary (85.125) The Binary representation of the number is : 1010101.001 calculate_sign_bit(n): Based on

>>> def convert float binary (n): ** Your Code ** >>> convert_float_binary (85.125) The Binary representation of the number is : 1010101.001 calculate_sign_bit(n): Based on the floating point number generates 1 if the number is negative and if the number is positive. >>> def calculate_sign_bit (n): ** Your Code ** >>> calculate_sign_bit (-85.125) The sign is negative with a sign bit : 1 normalize_binary(bin): Takes the binary for the floating-point number and returns the mantissa/fraction and exponent. >>> def normalize_binary (n): ** Your Code ** >>> normalize_binary (1010101.001) Mantissa: 010101001 exponent: 6 normalized calculate_biased_exponent(expo): Takes the exponent from representation and returns the binary of the biased exponenet. >>> def calculate_exponent_biased (n): ** Your Code ** >>> calculate_exponent_biased (6) The exponent is : 6 and biased exponent is : 10000101 IEEE754_rep(sign, biased_expo, fraction): Takes the sign, biased exponent, and fraction as an input and generates the IEEE 754 representation. >>> def IEEE 754_rep (sign, biased_expo, fraction): ** Call the methods in proper order to calculate the IEEE 754 representation as a string ** >>> IEEE754_rep ('0', '10000101', '01010100100000000000000'): The IEEE 754 single precision for 85.125 is : 0-10000101-01010100 100000000000000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
