單精度IEEE-754浮點(diǎn)數(shù) 詳細(xì)解說上網(wǎng)查詢
4 1 2 8 0 0 0 0
=0100 0001 0010 1000 0000 0000 0000 0000
bit 31 正負(fù)號 "0" => +
bit23~30 指數(shù) "100 0001 0" =>130 130-127=3 =>3次方
bit 0 ~22 尾數(shù)(要加1)=>"1010 1000 0000 0000 0000 0000"
=1*2^3+0*2^2+1*2^1+0*2^0+1*2^-1.............
=8 +0 + 2 + 0 + 0.5
=10.5