###### tags: `計算機組織_戴碧如` ## Chapter 3 - Arithmetic for Computers [TOC] #### Multiplier  - Multiplier 乘數 - Multiplicant 被乘數 - Product 商數 #### MIPS Multiplication - 因為 32bit x 32bit 最多可以乘出 64bit 的值 - `mult rs, rt` 會把 rs 乘以 rt,並且紀錄到 rd 裡面(64-bit) - 利用 HI/LO 分別取出前、後 32-bit`mfhi rd / mflo rd` - `mul rd, rs, rt` 這是簡化的乘法,執行時會先做 rs x rt,再執行`mflo rd`,可以這樣做的原因是因為大部分情況下,32-bit 就很夠用了。(偽代碼) #### Division  - Divisor 除數 - Dividend 被除數 - Quotient 商數 - Remainder 餘數 #### Floating Point  - 這種表示法稱為 IEEE 754-1985 表示法 - Single precision: 32-bit - Double precision: 64-bit #### IEEE Floating-Point Format  - S: 代表正負號 (0 => 正、1 => 負) - Fraction: 因為此表示法會是 1...,所以 Fraction 儲存的數值為小數點後的位元 - Exponent: excess representation - 全為 0 及全為 1 是保留數值。 - 指數的值會等於 [實際指數值] + [Bias] - Single Bias: 127 - Double Bias: 1023
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.