计组笔记第一章个人整理未完善

计算机组成原理 笔记整理

第一章

1.1

The Three–Y’s(三个原则)

•Hierarchy(层次化)

•Modularity(模块化)

•Regularity(规整化)

Weighted positional number system(带权的位置数制)

‒Base(基数)

‒weighted(权)

binary numbers:

​ base:2

​ weighted:2^i

bits(1),bytes(8),nibbles(4)

•2^10=1 Kilo≈1000(1024≈10^3)

•2^20=1 Mega≈1 million(1,048,576≈10^6)

•2^30=1 Giga≈1 billion(1,073,741,824≈10^9)

1.2

Data types representing information in a computer

Unsigned numbers(无符号数)

•Unsigned number:are created directly as ordinary binary codes

​ –Operation codes in the OP code field

​ –Register numbers in address field

​ –Memory address

​ –counter

​ –Time,clock frequency

Signed numbers(有符号数)

•Fix-Point Number(小数点不占位)

•Floating-Point Number(小数点占位)

MSB: the Most Significant (left-most) Bit

Sign-Magnitude Numbers(原码)

•1 sign bit,N-1 magnitude bits

•Sign bit is the Most Significant (left-most) Bit

​ –Positive number: sign bit=0

​ –Negative number: sign bit=1

•Example,4-bit sign/mag representations of ±6:

​ +6=0110;

​ -6=1110;

​ [+0]=0.0000000;

​ [-0]=1.0000000;

•Range of an N-bit sign/magnitude number:

​ [-(2(N-1)-1),2(N-1)-1]

Two’s Complement Numbers(补码)

–Addition works(易于加法操作)

–Single representation for 0(0的表示是唯一的)

•正数补码:和原码一样,符号用0表示,数值用二进制表示;

•负数补码:符号用1表示,原码数值部分按位取反,末位加1;

•The Most Significant Bit still indicates the sign

​ •1=negative,0=positive;

•Range of an N-bit two’s comp number:

​ [-(2N-1),2N-1-1]

One’s Complement Numbers(反码)

•Positive the sign ‘0’ at msb is attached to the magnitude in the remaining n-1 bits.

•Negative the sign ‘1’at msb is attached to the 1’s compl of the magnitude in the remaining n-1bits.

•Decimal:

​ –X1=+0.1011011,[X1]1’s compl=0.1011011

​ –X2=-0.1011011,[X2]1’s compl=1.0100100

•Integer:

​ –X3=+1011011,[X3]1’s compl=01011011

​ –X4=-1011011,[X4]1’s compl=10100100

•[+0]1’s compl=00000000;

​ [-0]1’s compl=11111111

Number System Range

Unsigned [0,2^N-1]

Sign/Magnitude [-(2(N-1)-1),2(N-1)-1]

One’s Complement [-(2(N-1)-1),2(N-1)-1]

Two’s Complement [-2(N-1),2(N-1)-1]

Overflow(溢出)

•Digital systems operate on a fixed number of bits

•Overflow: when result is too big to fit in the available number of bits

•See previous example of 11+6

Overflow Examples
Increasing Bit Width(扩展位数)

Extend number from N to M bits(M>N)

Zero-extension(零扩展)

​ •Zeros copied to msb’s

​ •Value changes for negative number

Sign-extension(符号扩展)

​ •Sign bit copied to msb’s

​ •Number value is same

你可能感兴趣的:(计组笔记第一章个人整理未完善)