Re: [理工] [计组]浮点数

楼主: koala0716   2016-11-10 19:39:55
※ 引述《VB2005 (DaiJouBu)》之铭言:
assume we are designing a 16bit mips cpu with 16 bit instruction words.
(1)assume the ieee-754 floating-point representation is also adjusted to
16bit long for this 16bit mips cpu. if the floating-point numbers are
required to represent the values within ±10^18 , what are the numbers
of bits of the feilds (a)(b)(c) in this 16 bit floating-point format?
please your reasons,(assume log 2 = 0.3 )
10
sign exponent mantissa
(a) (b) (c)
请问:
(b) 6bit (c) 9bit 怎么来的。 谢谢…
作者: ken52011219 (呱)   2016-11-10 20:12:00
10^18 约 2^18/0.3 =2*2^59通常下意识会认为应该要超过59才能概括此系统但其实这是此2^59是系统给的最大呈现数假若给7bit 2^64 >2^59 代表可以输入超过2^59~2^64系统会造成错误 因为它只能呈现到2^59为了避免造成Overflow 之类的状况 其实要取小于59的
楼主: koala0716   2016-11-10 20:30:00
所以within是指设计出来有些如10^18无法表达也ok?
作者: ken52011219 (呱)   2016-11-10 20:31:00
讲简单一下就是 题目单纯不能有超过+-10^18的数    点
楼主: koala0716   2016-11-10 20:35:00
所以exponent挑654321中最大的,表示范围尽量大又不over
作者: ken52011219 (呱)   2016-11-10 20:37:00
恩恩
楼主: koala0716   2016-11-10 21:43:00
感激不尽
作者: BaaaSwin (codown)   2016-12-21 23:41:00
表示范围10^18内->2^60内->Exponent=6->mantissa=16-1-6
作者: VB2005 (DaiJouBu)   2016-12-21 23:44:00
2^60内->Exponent=6 可以再说明一下吗?
作者: Bearcome (超级喜欢哈孝远)   2016-12-21 23:58:00
2^6=64 你只需要60
作者: VB2005 (DaiJouBu)   2016-12-21 23:59:00
哦~~了解。谢谢
作者: BaaaSwin (codown)   2016-12-22 00:37:00
6个Exponent可以表达到2的-30~31次方!
作者: Murasaki0110 (麦当劳欢乐送)   2016-12-22 12:11:00
请问, 可是题目要求不是要到2^60
作者: BaaaSwin (codown)   2016-12-22 12:41:00
不是表达的数要在2^60以内吗@@?还是我误会了我想说如果7bit表达的数就超过2^60了

Links booklink

Contact Us: admin [ a t ] ucptt.com