TransCSI 板


LINE

第一题我觉得怪怪的耶,不是只有负数才需要用补数表示嘛? 个人觉得.... 首先,-2==>1010 的1's是 1101 2's是1110 -1==>1001 的1's是 1110 2's是1111 +2==>0010 1's和2's应该都是同型 +1==>0001 同上 (应该没记错...只有负数才有补数) 这样的话...不就是无解?...orz... ※ 引述《Elfiend (小孩)》之铭言: : (3) 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: 218.170.45.182







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灯, 水草

请输入看板名称,例如:Tech_Job站内搜寻

TOP