IEEE 754

2007-02-26 12:29 am
Express the following numbers in IEEE 32-bit floating point format
a. -5 (decimal)
b. 1/16 (decimal)

can you specify that ?

回答 (1)

2007-02-28 6:46 pm
✔ 最佳答案
(a)

-5 = -1 x 5 = -1 x (1.25 x 22)

Sign = 1
Exponent = 127+2 = 129 = 100000012
Mantissa = 0.25 = 010 0000 0000 0000 0000 00002

Therefore,

-5 = 1100 0000 1010 0000 0000 0000 0000 00002
-5 = C0A0000016



(b)

1/16 = 0.0625 = +1 x (1.0 x 2-4)

Sign = 0
Exponent = 127-4 = 123 = 011110112
Mantissa = 1.0 = 000 0000 0000 0000 0000 00002

Therefore,

1/16 = 0011 1011 1000 0000 0000 0000 0000 00002
1/16 = 3D80000016


收錄日期: 2021-04-12 23:01:39
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070225000051KK03464

檢視 Wayback Machine 備份