看板 TransCSI 關於我們 聯絡資訊
※ 引述《zptdaniel ()》之銘言: : ※ 引述《larryfeng (ㄚ峰)》之銘言: : : 6. Consider an 8-bit binary number with the following bit pattern: : : 10101110 : : (a)What is the decimal number if the bit pattern represents a floating number of : : the following formal :SEEEMMMM ( S:sing E:exponent M:mantissa ). : "The sign is 0 for 6." : ^^^^^^^^^^^^^^^^^^^^^^ ??? 你題目可能打太長了,我猜有內容被截掉. : : (b)What are the maximal and the minimal positive numbers that can be : : represented by this format? : : (理念沒有學過,不知道該如何下手?) : : (如同上次的 IEEE754 一樣,希望可以教教我) : (a) : 1 010 1110 = (-1)^1 * 2^(-2) * 0.1110 = -0.00111(2) : S EEE MMMM S E M ^代表二進位 這邊有點錯誤 E的部分應該是 -1 而非 -2 M的部分應該是 1.1110 而非 0.1110 所以是 -0.1111(2) : 請自行轉成十進位 : (b) : maximal positive numbers = 2^3*0.1111 = 111.1 = 7.5 : minimal ....=2^(-4)*0.1111 = 0.00001111 =(請自行轉換) 這邊也是同樣的錯誤 maximal positive numbers = 2^3 * 1.1111 = 1111.1 = 15.5 minimal positive numbers (正規) = 2^(-2) * 1.0000 = -0.01 = 0.25 (非正規) = 2^(-2) * 0.0001 = -0.000001(2進位) : 有錯請指教~感恩! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.168.100.128
zptdaniel:囧 我每次浮點數都會弄錯 07/07 23:56
zptdaniel:E:010 這是Ex-4吧? 010(2) = -110(2) = -2(10) 07/08 00:00
zptdaniel:這樣不對嗎@@? 07/08 00:00
zptdaniel:然後..1.M不是只有IEEE754 才這樣嗎? 普通的不是用0.M? 07/08 00:01
zptdaniel:翻了書 min的部份是寫 2^(-4)*0.1(2) @@ 07/08 00:03
avogau:IEEE754的風格的話 會是Ex-3 07/08 00:38