NTU-Exam 板


LINE

课程名称:计算机概论 课程性质:选修 课程教师:陈彦仰 开课学院:电机资讯学院 开课系所:资讯工程学系 考试日期〈年月日〉:2011.11.22 考试时限〈分钟〉:120分钟 是否需发放奖励金:是 〈如未明确表示,则不予发放〉 试题: Part I: Multiple Choice Problems(21 points) Circle the letter of the choice that best completes the statement or answers the question. 1. Who designed the ENIAC? a. Alan Turing b. John von Neumann c. J. Presper Eckert and John William Mauchly d. Gordon Moore 2. Which programming language was invented after C++? a. Java b. Python c. C# d. all of the above 3. Which command can be used to find all users currently using the same machine? a. getpath b. who c. whereis d.find 4. How many bits are used to encode each symbol in ASCII code? a. 4 b. 6 c. 8 d. 9 5. Which is a volatile storage? a. Hard disk b. DRAM c. Floppy d. Flash memory 6. Which storage has the lowest latency? a. L1 cache b. L2 cache c. SDRAM d. Hard drive 7. How does Windows manage multiple processes? a, time-sharing b. event-driven c. distribute d. virtualization Part II: Alphabet Soup(20 points) For each terminology, spell it out completely, and explain (in either Chinese or English) briefly. 1. USB 2. DNS 3. GPU 4. SMTP 5. HTTP Part III: Short Answers(37 points) Answer the following questions briefly but clearly. 1. (5 points)Write a regular expression that defines the official email address of all NTU freshmen ([email protected] , x represents a number between 0-9) 2. (5 points)What are the major function of a computer operating system? 3. (5 points)Consider a simple 8-bit computer, what is the range of binary number that can be represented using 2's complement encoding? 4. (5 points)Please explain what is the little-endian and big-endian format? 5. (5 points)Please explain briefly the "Y2K38" problem. 6. (12 points)Write the Linux commands for performing the following tasks: A. Renaming the file "source.txt" to "target.txt" B. Defining a new command "delete" that removes files and directories. C. Listing all files whose names start with "Quiz" D. Listing all environment variables Part IV: Turing Machine (10 points) Draw the state diagrams of the Turing Machine you designed. Question: Let any given positive number n be represented in binary but without leading zeros. (eg. 2 is _ _ 1 0 _ _ not _ _ 0 1 0 _ _ or 0 0 1 0 _ _) Design a Turing Machine to do "multiply 2 to the number and then add 1" (which means output 2n+1) with the smallest number of states. (The number of states must be less than 5) Part V: Python Programming (20 points) Please answer the following questions of python language. 1. (5 points)Can the following program work?If yes, write down the value of R1. If no, please explain why and correct the program. A=[1,3,2] R1=A.sort() 2. (5 points)Can the following program work?If yes, write down the value of R2. If no, please explain why and correct the program. A=(1,3,2) R2=A.sort() 3. (10 points)Write a program that outputs a user's birth city based on the following table. (Eg. After reading the letter "A" from stdin, the program will output "Taipei City" to stdout.) ┌────┬────┬────┬────┬─────┬─────┐ │A │B │C │D │E │F │ ├────┼────┼────┼────┼─────┼─────┤ │Taipei │Taichung│Keelung │Tainan │Kaohsiung │New Taipei│ │City │City │City │City │City │City │ └────┴────┴────┴────┴─────┴─────┘ -- Ans: Part I: 1.c 2.d 3.b 4.c 5.b 6.a 7.a or b Note: For 7th question, both answers are acceptable, time-sharing is mainly for Linux, and event-driven are used by Windows) Part II: 1. Universal Serial Bus USB was designed to standardize the connection of computer peripherals, such as keyboards, pointing devices, digital cameras, printers, portable media players, disk drives and network adapters to personal computers, both to communicate and to supply electric power. 2. Domain Name System / Domain Name Service DNS is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or private network. 3. Graphics Processing Unit GPU is a specialized circuit designed to rapidly manipulate and alter memory in such a way so as to accelerate the building of images in a frame buffer intended for output to a display. 4. Simple Mail Transfer Protocol SMTP is an Internet standard for electronic mail (e-mail) transmission across Internet Protocol (IP) networks. 5. Hypertext Transfer Protocol HTTP is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web. Part III: 1. In ERE: b00[0-9]{6}@ntu\.edu\.tw 2. memory management, process management, storage & I/O managementm (graphical) user interface, network management, security etc. 3. -128 ~ 127 4. The term endian or endianness refers to the ordering of individually addressable sub-components within the representation of a larger data item as stored in external memory (or, sometimes, as sent on a serial connection). A big-endian machine stores the most significant byte first (at the lower byte address), and a little=endian machine stores the least significant bye first. 5. The buid-in time of computer starts from 1970-01-01 00:00 and counts seconds with an integer counter. Since 32-bit integer has a upper bound as 2^31-1, the couunter will overflow after 2^31-1 seconds. The overflow would happen on 2038- 01-19 03:14:07, and after the moment, the time would go back to 1901-12-13 20:45:52, making potential problems. 6. A. mv source.txt target.txt B. In bash shell: alias delete="rm -rf" C. ls Quiz* D. In bash shell: export Part IV: (1,1,→) (_,1,→) ┌───┐┌───┐ │ ↓│ ↓ ○ ○ ○ │↑ │↑ └┘ └┘ (_,_,→) (1,1,→) (0,0,→) Part V: 1. Yes, R1=[1,2,3] 2. No, tuple can't be modified. Tuple is immutable! We can use list instead or just create a new tuple! R2=(A[0], A[2}, A[1}) 3. dir={"A":"Taipei City","B":"Taichung City","C":"Keelung City","D":"Tainan City","E":"Kauhsiung City","F":"New Taipei City"} in=raw_input("Please type the first letter of your ID: ") print dir[in] --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.242.63
1F:→ andy74139 :已收录至资讯系!! 12/30 19:18







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

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

TOP