Question: Write a function my_ieee_2_dec(ieee), where icce is a string contains 64 char- acters of ones and zeros representing a 64-bit IEEE754 number. The output
Write a function my_ieee_2_dec(ieee), where icce is a string contains 64 char- acters of ones and zeros representing a 64-bit IEEE754 number. The output should be d, the equivalent decimal representation of iece. The input variable icce will always be a 64-element string of ones and zeros defining a 64-bit float. def my ieee_2_dec (ieee): # Write your function here return d >>> num1 = '1100000001001000000000000000000000000000000000000000000000000000' >>> my_ieee_2_dec (num1) -48 >>> num2 = 0100000000001011001100110011001100110011001100110011001100110011' >>> my_ieee_2_dec (num2) 3.39999999999999991118215802999
Step by Step Solution
3.46 Rating (149 Votes )
There are 3 Steps involved in it
You can convert a 64bit IEEE 754 binary representation to its decimal equivalent u... View full answer
Get step-by-step solutions from verified subject matter experts
