资源描述
1. If the memory cell whose address is 5 contains the value 8, what is the difference between writing the value 5 into cell number 6 and moving the contents of cell number 5 into cell number 6?
在第一种情况下,地址为6的存储单元结果包含值5;第二章情况下结果包含8
2. Suppose you want to interchange the values stored in memory cells 2 and 3.What is wrong with the following sequence of steps: *
Step 1:Move the contents of cell number 2 to cell number 3.
Step2:Move the contents of cell number 3 to cell number 2.
Design a sequence of steps that correctly interchanges the contents of these cells.
Answer: 2->1; 3->2; 1->3;
3. What advantage does a hard-disk system gain from the fact that its disks spin faster than those in a floppy-disk system?
有较快的数据检索速度和较高的传输速率。
4. In the ASCII code, what is the relationship between the codes for an uppercase letter and the same letter in lowercase?
除了从低端数第6位对大写字母和小写字母分别是0和1外,两个位模式是相同的。
5. Convert each of the following binary representations to its equivalen ten form:
将下列二进制(binary representations)表示转换为等价的十进制(ten form)形式
6. Convert each of the following base ten representations to its equivale binary form:
将下列十进制(ten representations)表示转换为等价的二进制(binary form)形式
7. Convert each of the following two's complement representations to its equivalent base ten form:
将下列二进制补码(two's complement representations)转换成等价的十进制
8. a. Suppose you XOR the first two bits of a string of bits and then continue down the string by successively XORing each result with the next bit in the string. How is your result related to the number of 1s appearing in the string?
b. How does this problem relate to determining what the appropriate parity bit should be when coding a message?
Answer:
a、 如果该串包含偶数个1,那么最后结果是0,否则是1;
b、 结果是偶校验的校验位值
9. Which of the following would require real-time processing?
a) Printing mailing labels
b) b. Playing a computer game Ö
c) c. Displaying letters on a monitor screen as they are typed at the keyboard Ö
d) d. Executing a program that predicts the state of next year's economy
10. Identify examples of queues. In each case, indicate any situations that violate the FIFO structure.
实时处理是指一个程序的执行要与机器的环境里的活动相协调。
交互处理时指一个程序在其执行时人要与他交互。
成功的交互处理需要好的实时特征。’
11. What is the difference between time-sharing and multitasking
分时是在单处理器的机器上实现多任务的技术。
12. List the components of a typical operating system and summarize the role of each in a single phrase. *
(外壳):与机器的环境通信
(文件管理程序):协调机器大容量存储器的使用
(设备驱动程序):处理与机器外部设备的通信
(存储管理程序):协调机器主存储器的使用
调度程序:协调系统中的进程
调遣程序:协调各个进程的CPU时间的分配
13. Summarize the difference between a program and a process. *
Program- a set of directions 指令的集合
Process-action of the following those directions 遵循这些指令的动作
14. In a time-sharing system, how can high-priority processes be allowed to run faster than others?
Dispacher 赋其高优先级--------或给该进程长的时间片
15. What is an open network?
Specifications and protocols are public
Allowing vendors to produce compatible products
16. What is a router?
网络层的互连设备
路由器是一台机器;它把两个网络连接成一个互联网。
术语网关通常是指把一个域连接到互联网其余部分的路由器
17. What is the purpose of tier-1 and tier-2 ISPs? What is the purpose of access ISPs?
Answer: tier-1 and tier-2提供
接入Internel的核心服务功能
接入服务商提供接入核心的能力
18. What is the DNS? *
名字服务器,负责将助记符地址转换成IP地址
19. What bit pattern is represented by 3.4.5 in dotted decimal notation? Express the bit pattern 0001001100010000 using dotted decimal notation.
3.4.5 000000110000010000000101
0001001100010000 19.16
20. What are the components of the complete Internet address of a machine?
一台机器完整的因特网地址由网络标识符和主机地址构成
21. What is a URL? A browser?
URLWWW(万维网)中指定的文档地址
Browser-一个程序用于访问超文本,帮助用户存取超文本
22. How does the Internet software ensure that messages are not relayed within the Internet forever?
每个消息赋予跳数(hop count)
23. Summarize the distinctions between a process, an algorithm, and a program. *
Answer:
Process-activity of execution an algorithm
一个进程是执行一个算法的活动
program-a representation of an algorithm
一个程序一个算法的表示
24. In what sense do the steps described by the following list of instructions fail to constitute an algorithm?
Step 1. Take a coin out of your pocket and put it on the table.
Step 2. Return to Step 1.
问题:不确定性—空口袋呢?
这里存在两点。
一、这些指令定义了一个不可终止的过程。但是,事实上,这个过程最终达到这样的状态:你的口袋里在没有硬币。实际上,这可能是初始状态。
二、这个算法正如所所表示的,她并没有告诉我们在这个情况下该怎么做,也就是说不知道初始状态是什么。
25. The Euclidean algorithm finds the greatest common divisor of two positive integers X and Y by the following process:
As long as the value of neither X nor Y is zero, continue dividing the larger of the values by the smaller and assigning X and Y the values of the divisor and remainder, respectively. (The final value of X is the greatest common divisor.)
Express this algorithm in our pseudocode.
X ¬the lager input;
Y ¬ the smaller input;
While (Y not zero) do
i. X ¬ Y
ii. Y ¬ Remainder
GCD ¬ X
26. Convert the pseudocode routine *
Z ¬0;
X ¬1;
while (X < 6) do
(Z ¬Z + X;
X¬X+ l)
to an equivalent routine using a repeat statement.
Answer:
Z ¬0;X ¬1;
repeat (Z ¬Z + X;X¬X+ l)Until (X = 6)
27. What names are interrogated by the binary search (Figure 5.14) when searching for the name be in the list Alice, Brenda, Carol, Duane, Evelyn, Fred, George, Henry, Irene, Joe, Karl, Larry, Mary, Nancy, and Oliver?
----Alice, Brenda, Carol, Duane, Evelyn, Fred, George, Henry, Irene, Joe, Karl, Larry, Mary, Nancy, Oliver
28. List the classes Q(n2), Q(lg n), Q(n), and Q(n3) in decreasing order of efficiency.
效率由高到低:Q(lg n)- Q(n)- Q(n2) -Q(n3)
29. In what sense is a program in a third-generation language machine independent? In what sense is it still machine dependent?
一个用第三代语言编写的程序,从某种意义上说它是独立于机器的,因为它的步骤不是按照诸如寄存器和存储单元地址这样的机器属性来描述的。
在另一方面,从某种意义上说,它又是以来于机器的,因为算术溢出和截断误差还是会出现的。
30. What is the difference between an assembler and a compiler? *
Assembler 汇编器-> machine instruction 1:1
compiler 编译器 -> machine instruction 1:n
31. Why is the use of a constant considered better programming style than the use of a literal?
使用描述性常量可以改进程序的可达性。
32. What is the difference between a declarative statement and an imperative statement?
Declarative statement说明术语
Imperative statement说明算法步
33. List some common data types.
整数,实数,字符和布尔等类型。
34. What is the difference between a global variable and a local variable?
局部变量仅在像过程这样的程序单元内事可存取的;
全局变量在整个程序中都是可存取的。
35. What is the difference between a procedure and a function? *
一个函数是这样的过程,它返回与函数的名字相联系的值。
36. Describe the three major steps in the translation process.
词法分析:识别标记的过程;
语法分析:识别程序的语法结构的过程;
代码分析:生成目标指令的过程
37. Why would the number of lines in a program not be a good measure of the complexity of the program?
Answer: 一个循环语句程序就得执行多次,因此语句数不能说明问题
一长串赋值语句并不比设计成几句嵌套的if语句发杂。
38. What is the difference between system requirements and system specifications?
system requirements系统需求从应用环境的角度表达
system specifications系统说明以技术术语的观点以及说明如何来满足系统需求的角度来表达。
39. Summarize the distinction between the traditional waterfall model of software development and the newer prototyping paradigm.
传统瀑布方法要求分析、设计、实现以及测试各阶段以线性方式执行。
而原型模型是一种比较宽松的反复试验,不断摸索的方法。
40. in what form can software be documented
在附随的手册里,有注释清晰以及精心编写代码的源程序,程序本身显示在终端上的交互信息,有数据字典以及文档的设计格式,如结构图、类图、数据流图以及实体关系图。
展开阅读全文