2010年3月31日

2010年3月29日

異形叔叔的計算機組織之作業I

2.4 Why doesn't MIPS have a subtract immediate instruction?

參考答案:課本 Page.66 - Check yourself ,中文譯本 Page.61 - 自我測驗

大意為:

1.負常數在 C 和 Java 不常出現,因此他們不是常態,不需要提供特別支援
2.因為立即指令的放置立即值的欄位,可以放置負常數或正常數,立即加法加一個負數同等於立即減法減一個正數,所以不需要立即減法

*Mobile01 網友解答版:
http://www.mobile01.com/topicdetail.php?f=174&t=644124

2.6 Some computers have explicit instructions to extract an arbitrary field from a 32-bit register and to place it in the least significant bits of a register.

The figure below shows the desired operation:
Find the shortest sequence of MIPS instructions the extracts a field for the constant values i=5 and j=22 form register $t3 and places it in register $t0.(Hint : It can be done in two instructions.)

概念:
1. 數字帶入
2. 把 field 向左移到頂( 向左移9
3. 再將 field 推至底( 向右移15使 31 到 field 之間位置呈零,即完成

推移語法:課本 Page.71 - FIGURE2.10 ,中文譯本 Page.65 - -圖2.10

*向左位移:sll
*向右位移:srl

參考答案:

sll $t0,$t3,9
srl $t0,$t0,15

感謝哲睿熱情解題!

2.19 Iris and Julie are students in computer engineering who are learning about ASCII and Unicode character sets. Help them by spelling their names and your first name in both ASCII(using decimal notation) and Unicode(using hex notation and  the basic Latin character set.)

參考答案:課本 Page.91 - FIGURE 2.21 , 中文譯本 Page.86 - 圖2.21

ASCII 部分可以參照課本給的表
而 Unicode Latin 則是把 ASCII 碼轉成16位元,即完成
提供轉碼服務的網站(包含 ASCII 與 Unicode Latin):

Iris :
ASCII : "73,114,105,115"
Unicode : "49,72,69,73"

Julie :
ASCII : "74,117,108,105,101"

Unicode : "4A,75,6C,69,65"

以及你自己的 First name! 的 ASCII 與 Unicode !

*Remember 要手寫且要抄題目。
*題目僅獻給沒有課本的小孩。

2010年3月16日

放淡,吧

從三月的一半開始

決定

放淡

放淡跟每個人

之間的關係

越是投入每段關係裡

就越是把我自己放進湯裡攪

越攪越糊

太過濃烈

就不是每個人都可以接受的了

還是清淡點吧


至少到目前為止

太過濃烈的情感

還沒有出現好的結局

2010年3月1日

才開學一個禮拜

忙的跟鬼一樣

半夜睡不著覺

盤算著明天要幹嘛幹嘛

沸沸揚揚的幾則八卦

帶來低潮的某些事件

令人難過的記憶回憶

不想在意的一些細節

讓人費解的相處關係

難以釋懷的高端思維

忙碌

是最加的代名詞