close
11001

計概浮點數

這邊不知道可不可以問=.=首先 題目是這樣A certain computer represents floating point numbers by means of a signed magnitudedfractional mantissa(with the bit right after the decimal is hidden since it is always one)and an excess 32 base 2 exponenent. The 16 bits word format is shown below1 100100 100100000 共16bitsign exponenent mantissa解答是說 -0.11001*2^4我的問題在於mantissa部分-0.11001*2^4 第一個1是隱藏我知道 第二個1因為他說小數部分用signed magnitude表示阿所以100100000應該是負的 而sign為1 bit 所以整個float應該負負得正阿= =? 解答是-12.5能否幫解答這問題 感恩 ..
signed magnitude 的 sign 指的是最最最前面的那個 bit:1 100100 .... 的 1不是第三段的 100100000 的最前面的 1 或它前面失蹤的 1。

這樣

懂了嗎?補回失蹤的 1

數值為 1.1001(2) = 1 .5 .0625 = 1.5625指數為 100100(2) = 36

36 - 33 =3

arrow
arrow

    11001 發表在 痞客邦 留言(0) 人氣()