※ 引述《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 怎么来的。 谢谢…
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的
所以within是指设计出来有些如10^18无法表达也ok?
讲简单一下就是 题目单纯不能有超过+-10^18的数 点
所以exponent挑654321中最大的,表示范围尽量大又不over
作者:
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:002^60内->Exponent=6 可以再说明一下吗?
作者:
Bearcome (超级喜欢哈孝远)
2016-12-21 23:58:002^6=64 你只需要60
作者:
VB2005 (DaiJouBu)
2016-12-21 23:59:00哦~~了解。谢谢
作者:
BaaaSwin (codown)
2016-12-22 00:37:006个Exponent可以表达到2的-30~31次方!
作者:
BaaaSwin (codown)
2016-12-22 12:41:00不是表达的数要在2^60以内吗@@?还是我误会了我想说如果7bit表达的数就超过2^60了