《Computer Organization and Design》Chap.3 笔记

提要:

  1. 加法器、减法器、乘法器和除法器的实现。
  2. 如何进行浮点运算?
  3. Subword Parallelism?(待看)

3.4除法器待看。

内容:
加法运算中需要注意溢出的发生,如何去判断?——两个正数相加得负即可知发生了溢出,负数相加反之亦然。

overflow occurs when adding two positive numbers and the sum is negative, or vice versa.

unsigned integers通常用于内存地址,一般不考虑溢出,若需要判断,则——和小于任一加数,或差大于减数 为溢出。

Addition has overflowed if the sum is less than either of the addends, whereas subtraction has overflowed if the difference is greater than the minuend.

乘法器和除法器的原理,参考博客园的一篇文章:计算机组成原理 4 乘法器和除法器的原理,其中的PPT十分易懂,可惜不知道出处。摘录部分如下:
乘法器硬件Version1
乘法器硬件Version2
Faster multiplication部分,书中给出的附图Figure 3.7似乎有误?例如当最高位是进位产生时如何由mplier63&Mcand得出呢?
Fast multiplication

浮点数的表示法,用IEEE 754 Floating-Point Standard。
在浮点运算中尤其要注意精度,rounding with guard digits。精度衡量采用units in the last place (ulp),IEEE 754的运算规则可保证数字精度在半个ulp之内。此外还有采用sticky bit。

猜你喜欢

转载自blog.csdn.net/u013213111/article/details/85270725