Homework 03
Homework 03¶
3.7¶
不会溢出,因为 185 本身已经超出存储范围(-128~127),所以在计算过程中被认为为 -57,最终结果为 65。
3.20¶
两种情况下均为 201326592
3.26¶
\(-1.5625\times 10^{-1}=-0.15625=-(0.00101)_2\)
\(\therefore \text{exponent}=-2,\text{fraction}=-(0.101)_2\)
\(\therefore \text{answer}=111111111110101100000000000000000000\)
3.27¶
\(-1.5625\times 10^{-1}=-0.15625=-(0.00101)_2\)
\(\therefore \text{exponent}=-3+15=12,\text{fraction}=-(0.01)_2\)
\(\therefore \text{answer}=1011000100000000\)
3.32¶
\[
\begin{gather}
(3.984375\times 10^{-1}+3.4375\times 10^{-1})+1.771\times 10^3\\
=(1.1001100000\times 2^{-2}+1.0110000000\times 2^{-2})+1.1011101011\times 2^{10}\\
=1.0111110000\times 2^{-1}+1.1011101011\times 2^{10}\\
=1.101110101110111110000\times 2^{10}(\text{Round up})\\
=1.1011101100\times 2^{10}=1772
\end{gather}
\]