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