フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

without using functions, how to write a code for generating base 10 equivalent from given mantissa and exponent?

1 回表示 (過去 30 日間)
Abi sek
Abi sek 2018 年 1 月 31 日
閉鎖済み: John D'Errico 2018 年 1 月 31 日
Write a program that converts a given floating point binary number with a 24-bit normalized mantissa and an 8-bit exponent to its decimal (i.e. base 10) equivalent. For the mantissa, use the representation that has a hidden bit (i.e. the leading 1 in the normalized representation is not stored explicitly), and for the exponent use a bias of 127 instead of a sign bit. (You need to find out what this “bias” means if you do not know it already.) Of course, you need to take care of the sign in the mantissa also. Use your program to answer the following questions: (a) Mantissa: 11110010 11000101 01101010, exponent: 01011000. What is the base-10 number? (b) What is the largest number (in base 10) the system can represent? (c) What is the smallest non-zero positive base-10 number the system can represent? (d) What is the smallest difference between two such numbers? Give your answer in base 10. (e) How many significant base-10 digits can we trust using such a representation? Your program should do the computations from first principle, and not use functions already available in MATLAB.The leading bit in the mantissa is the sign bit.
  1 件のコメント
Rik
Rik 2018 年 1 月 31 日
This forum is not a homework service or free consulting platform. Have a read here and here. It will greatly improve your chances of getting an answer. You can find guidelines for posting homework on this forum here.
If you show some effort, people will be much more likely to help you. Just pasting the text of your assignment here will attract very little sympathy.
There is also something unclear about the assignment: "functions already available in MATLAB" is so broad that you can do anything meaningful. Even addition and subtraction are functions, so this restriction is denying the use of Matlab, which is obviously not the intent. So what functions are you allowed to use?

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by