Question: a ) Develop a Matlab function decima 1 2 binary that converts a decimal number x into a binary floating point number in enginecring notation.
a Develop a Matlab function decimabinary that converts a decimal number into a binary floating point number in enginecring notation. The function shall take as input the decimal number and the number of bits to be used in the mantissa excluding the hidden bit and shall output the vector m containing the mantissa bits excluding the hidden bit the exponent in decimal of the binary floating point number in engineering notation, and the remainder r of the transformation. Do not print out results to screen within the function.
b Using the function decimalbinary convert the decimal number to a binary foating point number in engineering notation using and mantissa bits and report the remainders.
c Why does Matlab report the remainder as when mantissa bits are used, even though infinitely many bits would be required to convert the decimal number into a binary foating point number?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
