Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 2: a. (15%)Write a function in MATLAB to convert a floating-point number to a decimal number using the formula provided below (the numbers in
Problem 2: a. (15%)Write a function in MATLAB to convert a floating-point number to a decimal number using the formula provided below (the numbers in red, blue and green provide a reference for which bits are used for sign precision/exponent). Use for loops to plug the bits into the formula rather that writing them in one at a time. (Hint: use one for loop to assign the precision bits and another for the exponent. Once these have been computed separately you can sum and multiply them at the end.) Decoding rule: fp = (-1)3 (1 + 2 + + ... +452) 2(11+6202+0,22+328 +-+e;210)1023 1|100000000100101100000000000000000000000000000000000000000000000 b. (5%) Use your function to convert the number x provided below into decimal: x=(1 10000000011010100001110000000000000000000000 000000000000000 0 0 0 0)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started