天天看點

計算機組成計算,計算機組成原理計組計算題

《計算機組成原理計組計算題》由會員分享,可線上閱讀,更多相關《計算機組成原理計組計算題(7頁珍藏版)》請在人人文庫網上搜尋。

1、Let the carry bits of an adder are C4, C3, C2, C1. C0 is the carry from the low bit. Please give the logic expressions of C4, C3, C2, C1 in ripple carry mode and carry look ahead mode respectively.解 :(1)串行進位方式:C1 = G1 + P1 C0其中: G1 = A1 B1 ,P1 = A1B1G2 = A2 B2 ,P2 = A2B2C2 = G2 + P2 C1G3 = A3 B3 , P。

2、3 = A3B3C3 = G3 + P3 C2G4 = A4 B4 , P4 = A4B4C4 = G4 + P4 C3(2) 并行進位方式:C1 = G1 + P1 C0C2 = G2 + P2 G1 + P2 P1 C0C3 = G3 + P3 G2 + P3 P2 G1 + P3 P2 P1 C0C4 = G4 + P4 G3 + P4 P3 G2 + P4P3 P2 G1 + P4 P3 P2 P1 C0其中 G1G4 ,P1P4 表達式與串行進位方式相同。Given: x= 0.1011,y = - 0.0101Ask: 1/2 x 2s compl,1/4 x 2s compl, 。

3、- x 2s compl,1/2 y 2s compl,1/4 y 2s compl, - y 2s compl解: x 補 = 0.1011, y 補 = 1.101111x 補 = 0.01011 , x 補 = 1.11011 22 1 x 補 = 0.001011 , 1 x 補 = 1.111011 44 - x 補 = 1.0101 , - x 補 =0.0101 Given a decimal number 20.59375, represent it as a normalized single-precision floating-point number in IEEE 7。

4、54 standard format.首先分别将整數和分數部分轉換成二進制數: 20.59375 = 10100.10011 然後移動小數點,使其在第 1,2 位之間10100.10011=1.010010011*24 e4于是得到:S0, M010010011Ee+127 = 4+127 = 131 = 1000 0011二進制表示:0100 0001 1010 0100 1100 0000 0000 0000(41A4C000)16Suppose a computer with a clock frequency of 100 MHz as four types oftructions, 。

5、and the frequency of usage and the CPI for each of them are given in table.(1) Find the MIPS of the computer and the T (CPU time) required to run a program of107tructions.(2) Combining comparing and branchtructions together so that comparetructions can be replaced and removed. Suppose each comparetr。

6、uction wastruction isoriginally used with one branchchanged to a compare&branchtruction, and now each branchtruction. Also suppose that the new proposal woulddecrease the clock frequency by 5%, because the new compare&branchneeds more time to execute. Find the new CPIave, MIPS, and T.truction(1)求該計算。

7、機的 MIPS 值以及運作一個具有 107 條指令的程式所需 CPU 時間。解:CPIave = 0.4*2 + 0.3*4 + 0.08*2.5 + 0.22*3 = 0.8+1.2+0.2+0.66 = 2.86truction operationFrequency of usageCycles pertructionArithmetic-logic40%2Load/store30%4compare8%2.5branch22%3MIPS = f(MHz)/CPIave = 100/2.86 = 35T(sec) = ICCPIave/ f(Hz) = 107*2.86 / (100*106。

8、) = 0.286s(2)假定每一條比較指令原來都和一條轉移指令合用,現在都變為一條比較轉移指令,另外還假定新方案的改變将降低時鐘頻率 5%,因為新的比較轉移指令需要較多的時間來執行。求新的 CPIave、MIPS 和 T 解:CPIave = (0.4*2 + 0.3*4 + 0.22*3)/0.92 = 2.66/0.92 = 2.9MIPS = f(MHz)/CPIave = (100*95%)/2.9 = 32.76T = ICCPIave/ f(Hz) = (0.92*107 ) *2.9/(0.95*100*106) = 0.28s問題 5IEEE 754 format of X 。

9、is (41360000)16, what is its decimal value?解:将十六進制數展開,可得二進制數格式為:0 100 0001 0 011 0110 0000 0000 0000 0000ppp指數 e=階碼127=1000001001111111= 00000011 =(3)10包括隐藏位 1 的尾數 1.M = 1.011 0110 0000 0000 0000 0000 = 1.011011于是有:X = (-1)s * 1.M * 2e = +(1.011011)2 * 23 = + (1011.011)2 = (11.375)10問題 6CPU執行一段程式時,c。

10、ache 完成存取的次數為 5000 次,主存完成存取的次數為 200次。已知 cache 存取周期為 40ns,主存存取周期為 160ns。求: (1)ache 命中率 H,(2)Cache/主存系統的通路效率 e,(3)平均通路時間 Ta。解: 命中率 H = Nc/(Nc+Nm) = 5000/(5000+200)=5000/5200=0.96 主存慢于 cache 的倍率 R = Tm/Tc=160ns/40ns=4 通路效率: r + (1-r) h14 + (1-4) 0.9689.3 平均通路時間 400.89345ns1.設 CPU 共有 16 根位址線,8 根資料線,并用 M。

11、REQ 作訪存控制信号(低電平有效), 用 R/W 作讀寫控制信号(高電平為讀,低電平為寫),現有下列晶片及各種門電路(自定),如圖。畫出 CPU與存儲器的連接配接圖。要求:(1)存儲晶片位址空間配置設定為:最大 4K 空間為系統程式區,相鄰的 4K 為系統程式工作區,最小 16K 為使用者程式區;(2)指出選用的存儲晶片類型及數量;(3)詳細畫出片選邏輯。解:(1)存儲晶片位址空間配置設定:最大 4K 空間為系統程式區; 相鄰的 4K 為系統程式工作區; 最小 16K 為使用者程式區;0A15 A14 A13 A12 A11A10 A9A8 A7 A6 A5 A4A3 A2 A1A0162 =64k0 1 。

12、0 01 1 0 10 0 0 0 0 0 0 01 1 1 1 1 1 1 10 0 0 01 1 1 10 0 0 01 1 1 10 0 00 0 0 01 1 11 1 1 10 0 00 0 0 01 1 11 1 1 10 0 0 01 1 1 11 1 1 101 1 1 101 1 1 111 1 1 110 0 0 0 00 0 0 01 1 1 1 11 1 1 11 1 1 001 1 1 010 01 10 0 0 000 0 0 110 0 0 0 0 0 00 0 0 01 1 1 1 1 1 11 1 1 10 0 0 0 0 0 00 0 0 01 1 1 1 。

13、1 1 11 1 1 10 0 1 000 0 1 11RAM(16K)空閑(40K)RAM(4K)ROM(4K)74LS138AkAoDnDo1K4位2K8位8K8位CsRAMWEAmA0CsROMDnDo2K8位8K8位CS0 = Y0CS1 = Y1CS2 = Y7+A12CS3 = Y7+A12+A11CS4 = Y7+A12+A112. 用 16M 字8 位的存儲晶片構成一個 64M 字16 位的主存儲器。要求既能夠擴大存儲器的容量,又能夠縮短存儲器的通路周期(提高通路速度)。 (1) 計算需要多少個存儲器晶片。(2)存儲器晶片和主存儲器的位址長度各需要多少位?(3)畫出用存儲器晶片構成主存儲器的邏輯示意圖。(4)用 16 進制表示的位址 1234567,其體内位址和體号是多少?解:(1)計算需要多少個存儲器晶片?8 個A2A25解:(2)存儲器晶片和主存儲器的位址長度各需要多少位?存儲器晶片的位址長度為 24 位。主存儲器的位址長度為 26 位A1解:(3)畫出用存儲器晶片構成主存儲器的邏輯示意圖。A0如右圖解:(4) 位址 1234567H,其體内位址和體号是多少?1234567 右移兩位是 48D159,是以其體内位址為:48D159最低兩位是 11B,是以其體号為 3。