TransCSI 板


LINE

(4) 1.which value can be added to 1's complement to get 2's complement? (1) -2 (2) -1 (3) +2 (4) +1 答:1's complement的負數 +1 就得到 2'complement的負數 (4) 2.Which of the following memory components has the fastest access speed? (1) SRAM (2) Cache (3) DRAM (4) Register 答:存取速度:Register > Cache > SRAM = DRAM (2) 4.Which of the following is not a binary logic gate? (1) AND gate (2) Tri-state buffer (3) Inverter (4) Half-adder 答:Inverter是not gate吧,half-adder也是邏輯電路組成的吧。 Tri-state buffer 我只知道後面是暫存器~前面那個就不知道了。 (1) 5.Given two 4-bit numbers:0110 and 1011,what is the result of adding them together if they are signed magnitude? (1) 0001 (2) 0011 (3) 1101 (4) 1011 (5) 1001 答:如果1011是用二的補數表示,則為-5 6+(-5) = 1 直接加則是 10001 第一個1溢位刪掉 就是0001 (3) 8.Different parts of the large task may be executed by different processors . What is this architecture? (1) SISD (2) SIMD (3) MIMD (4) MISD (5) none of above (4)10.A linked list has the functions insertAtFront,removeFromFront, insertAtBack,and removeFromBack,which perform operations on nodes exactly as their names describe. Which two functions would most naturally model the operation of a queue? (1) insertAtBack and removeFromBack .(2) inertAtBack and removeFromFront. (3) insertAtFront and removeFromFront.(4) inertAtFront and removeFromBack . 答: 序列是先進先出。所以在頭加入、在尾刪除。 (3)11.If the macro #define RECTANGLE_AREA(x,y)((x)*(y)) has been defined. then the line rectArea = RECTANGLE_AREA( a+4,b+7) ; will be expanded to (1) rectArea = 11 ; (2) rectArea= (a+4*b+7); (3) rectArea = ((a+4)*(b+7)); (4) RECTANGLE_AREA(a+4,b+7); (4)12.Given the preprocessor directive #define HAPPY(x) printf ("happy,"#x"\"); How would you invoke this macro to generate a statement that would print Happy BIRTHDAY (followed by a newline) at execution time? (1) Happy(Birthday) (2) Happy(BIRTHDAY) (3) HAPPY(Birthday) (4) HAPPY(BIRTHDAY) 簡答題: 14. Convert 110101 to hex and decimal. 答:1*2^5 + 1*2^4 + 1*2^2 + 1*2^0 = 53 in decimal 53 = 3*16^1 + 5*16^0 = 35 in hex 15. Suppose a communication line is being used to transmit data serially at 28,800 bps. If a burst of interference lasts 0.01 second, how many data bits would be affected? 答:傳送速率: 28800 bits/每秒 所以0.01秒就有 288 bits被影響無法傳送 16. Suppose a time-sharing operating system is allotting time slices of 50 milliseconds.It normailly takes 8 milliseconds to position a disk's read/write head over the desired track and another 17 milliseconds for the desired data to rotate around to the read/write head. (1)How much of program's time slice can be spent waiting for a read from a disk to take place? (2)If the machine is capable of executing ten instructions each microsecond, how many instructions can be executed during this waiting period? 答:(1)-尋覓時間:8 milliseconds 轉動延遲:17 milliseconds 所以存取時間 = 8+17 = 25 千萬秒 是半個 time slices (2)-25千萬秒 除上 微秒/10 = 25 * 10^7 / 10^(-7) = 25 * 10^14 我是否誤會milliseconds的意思?? 另外(1)的take place是指?發生? 17. A hash file using the division hash function,i.e.divided by number of buckets, is to be constructed with 50,51,52,or 53 buckets. Which of these choices is best? Why? 答:53,因為是質數,與0~52皆互質,不會特別容易得到某個餘數。 18. Suppose we have 41 buckets. What is the probability of the first eight entries being placed in empty buckets by the division hash function? 答: 41*40*39*38*37*36*35*34 / 41^8 19. Is the bubble sort algorithm a P-problem? Why? 答:是,因為泡沫排序法屬於Θ(n^2),所以是多項式問題。 20. Is the bubble sort algorithm a NP-problem? Why? 答:是,因為任一多項式問題皆可加入非既定指令且不影響其效能。 21. A program performs modules A,B,C, and D. Each has executing time N,NlogN+N,N^2,and 2^N respectively. What is the Big-O complexity of the overall program? 答:A→O(N) B→(NlogN+N) C→(N^2) D→(2^N) 22. Write a recursive function reverse_string to reverse a string by C. For example, char[] = "ABCDEFGH"; printf("%s/n",a); /*"ABCDEFGH*/ reverse_string(a); printf("%s/n",a); /*"HGFEDCBA*/ 答: void reverse_string (chat a[]){ char string[]; int m=0,n=0; while(a[m]!='\0'){ m++; } m--; while(m>=0){ string[n]=a[m] m--; n++; } while(n>=0){ a[n]=string[n] n--; } } -- 以上有錯請指正~ 缺的題目~會在下篇~ --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.138.221.177 ※ 編輯: Elfiend 來自: 220.139.132.172 (06/18 20:05)







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:iOS站內搜尋

TOP