Software Design - - the second half of 2012 multiple-choice questions important points

1, a cyclic redundancy check code (CRC) encoded using the generator polynomial. K is a set of data bits, parity bits r bits, the CRC code for the format (r check bits with the data bits after k).

A: After a r k data bits with check bits

B: After r check bits with k data bits

C: r k check bits added to the random data bit

D: r check bits and other data bits are added to k intervals

 

[A]:

The computer system is running between the various components to exchange data, in order to ensure correct data transmission process, first, to improve the reliability of the hardware; second is to improve the ability to check the code, including error checking and correction.

Three common check codes: parity code (Parity Codes), Hamming code (Hamming Code) and a cyclic redundancy check (Cyclic Redundancy Check, CRC) code.

Cyclic redundancy check code is widely used in the field of data communications and magnetic media storage systems. It is using the generator polynomial r check bits to produce k bits to encode data, which code length is r + k. The CRC code format:

 

 

2, and described below with respect to fixed-point representation floating point representation of numbers, it is not true that (fixed-point notation, decimal point need to take a memory bit)

A: represents a number of fixed-point representation of the method (referred to as fixed-point) are often divided into two kinds of decimal point and fixed-point integer

B: In fixed-point representation, the decimal point need to occupy a storage position

C: floating point representation with mantissa and exponent represents a number, called the float

D: at the same total number of bits, the floating-point representation may represent a larger number of

 

[A]:

Various forms of data representation in a computer called a number of machines, which is characterized by a binary notation, the symbol number represented by 0, the decimal point is implied by, without accounting for the position . The actual value of the number corresponding to the machine referred to the number of truth values. In order to facilitate the number of machine operation, signed using different methods of encoding the original code, the inverted, complement and shift the like.

The so-called fixed-point, that is when the decimal point represent data in a fixed position. The decimal point is generally agreed two ways: fixed-point integer (pure integer, the least significant values after the decimal point position), and fixed-point fractional number (decimal fraction, the decimal point at the highest

Before the effective bit values).

When the machine word size of n, one's complement fixed-point shift may represent the number 2 ^ n, while the original code and the inverted only 2 ^ n-1 represents the number (0 indicates occupy two coding) Therefore, fixed-point numerical range can be represented is relatively small, because it is easy calculation result is out of range overflow.

The general form of the floating point number is represented by: N = 2EXF, referred to as the order code where E, F is mantissa. Order code generally pure pure fractional signed integer unsigned mantissa. Floating point representation format is as follows:

 

Obviously, a number of floating-point representation is not unique. When the position of the decimal point is changed, the order codes are also changed accordingly, the same number can be represented in a variety of floating-point format .

Range can be represented by floating-point values ​​mainly determined by the exponent, the mantissa represented by the numerical accuracy of the decision.

 

 

 

 3, (associative memory) does not belong to a class of memory is divided by addressing.

A: Random Access Memory
B: sequential memory
C: associative memory
D: Direct Memory

 

[A]:

A memory storage system, access can be divided according to the memory address accessed by the memory and accessed by content:

Classification can be divided by addressing a random access memory, and direct memory sequential memory.

RAM (RandomAccess Memory, RAN) refers to any or read data stored in the storage unit , the time required to access any memory units are identical.

Sequential memory (Sequentially Addressed Memory, SAM) refers to a storage location of data access time required for the relevant data is located , the tape is a typical sequential memory.

Direct Memory (DirectAddressed Memory, DAM) is interposed between one addressing mode random access and sequential access . Is a direct access storage disk, its track address is random, but in a track is sequentially addressed.

A storage device associative memory is accessed by content . Its working principle is that part of a data or data as a key, the key of each cell is compared with the memory, so as to find all the keywords of the same data word memory.

 

 

 

 

4, (SCSI) does not belong to the system bus.

A: the ISA
B: the EISA
C: the SCSI
D: the PCI


[A]:

Bus also known as the system bus or bus board, in the computer system used to connect each of the surface features to form a complete microcomputer system.

The system bus comprises a bus has three different functions, i.e., the data bus DB (0Data Bus), an address bus AB (Address Bus) and a control bus CB (Control Bus) .

ISA (Industrial Standard Architecture) bus standard is a standard bus system for the launch of IBM's 1984 PC / AT machine established, also called AT bus. XT is an extension of the bus, to accommodate the requirements of 8/16 bit data bus.

EISA bus 1988 by the Compag 9 companies jointly launched bus standard. It uses the ISA bus on the basis of bilayer socket 98 in the original ISA bus signal lines and the signal lines 98 increases, which adds an EISA ISA signal line between the two signal lines. In practice, EISA bus is fully compatible ISA bus signals.

PCI (Peripheral Component Interconnect) bus is one of the most popular bus, which was introduced by Intel a local bus. It defines the 32-bit data bus, and may be extended to 64 bits. Volume PCI bus board slot is smaller than the original ISA bus slot, supports burst read and write operations, the maximum transmission rate of up to 132MB / S, for the simultaneous multiple peripherals. PCI local bus is not compatible with the existing ISA, EISA, MCA Micro ChannelArchitecture) bus, but it is not subject to the processor, a Pentium-based and other new - ^ bus generation of microprocessors and development.

SCsI (Small Computer Syst em Interface) 是一种用于计算机和智能设备之间(硬盘、软驱、光驱,打印机、扫描仪等)系统级接口的独立处理器标准。

 
 
 

5、以下图像文件格式中,(GIF)可以在单个文件中实现多个图片轮流显示或者构成简单的动画效果。

A:BMP

B:JPEG

C:GIF

D:TIFF

 

【解析】:

BMP图像文件格式是Windows操作系统采用的图像文件格式,BMP 采用位映射存储格式,除了图像深度可选以外,一般不采用其他任何压缩,所以占用的存储空间较大。

JPEG图像文件格式是- "种有损压缩的静态图像文件存储格式,压缩比例可以选择,支持灰度图像、RGB真彩色图像和CMYK真彩色图像。JPG 格式文件的压缩比例很高,非常适用于处理大量图像的场合。

TIFF是电子出版CD-ROM中的一个图像文件格式。TIFF格式非常灵活易变,它又定义了4类不同的格式: TIFF-B 适用于二值图像: TIFF-G 适用于黑白灰度图像: TIFF-P 适用于带调色板的彩色图像: TIFF-R 适用于RGB真彩图像。无论在视觉上还是其他方面,都能把任何图像编码成二进制形式而不丢失任何属性。

GIF图像文件格式以数据块为单位来存储图像的相关信息,采用了LZW无损压缩算法按扫描行压缩图像数据。它可以在一个文件中存放多幅彩色图像,每一幅图像都由一个图像描述符、可选的局部彩色表和图像数据组成。如果把存储于一个文件中的多幅图像逐幅读出来显示到屏幕上,可以像播放幻灯片那样显示或者构成简单的动画效果。GIF定义了两种数据存储方式,一种是按行连续存储,存储顺序与显示器的显示顺序相同:另一“种是按交叉方式存储,由于显示图像需要较长的时间,使用这种方法存放图像数据,用户可以在图像数据全部收到之前这幅图像的全貌,而不觉得等待时间太长。

采用图像文件格式支持实现的显示效果与通过软件的实现方式相比,循环显示图像的数量、每幅图像显示的时间、透明度变化等参数受图像文件格式的限制,而通过软件方式实现显示效果的各项参数则可以灵活配置。

 

 

 

6、计算机终端用户因等待时间过长而放弃下载或显示图片/影像的问题,不能通过采用 (AD/DA变换方式)来解决。

A:流媒体技术

B:JPEG累进编码方式

C:GIF图像文件格式

D:AD/DA变换方式

 

【解析】:

流媒体是指在网络中使用流式传输技术的连续时基媒体,而流媒体技术是指把连续的影像和声音信息经过压缩处理之后放到专用的流服务器上,让浏览者一边下载一边观看、收听,而不需要等到整个多媒体文件下载完成就可以即时观看和收听的技术。流媒体融合了多种网络以及音视频技术,在网络中要实现流媒体技术,必须完成流媒体的制作、发布、传播、播放等环节。

JPEG累进(或增量、渐进、递增、progressive)编码模式,这样可以实现图像内容的方式传输,在浏览器上的直观效果是无需过久等待即可看到模糊的图像,然后图像显示内容由模糊逐渐变得清晰。

GIF图像文件格式以数据块为单位来存储图像的相关信息,采用了LZW无损压缩算法按扫描行压缩图像数据。它可以在一个文件中存放多幅彩色图像,每一幅图像都由一个图像描述符、可选的局部彩色表和图像数据组成。如果把存储于一个文件中的多幅图像逐幅读出来显示到屏幕上,可以像播放幻灯片那样显示或者构成简单的动画效果。GIF定义了两种数据存储方式,一种是按行连续存储,存储顺序与显示器的显示顺序相同:另一“种是按交叉方式存储,由于显示图像需要较长的时间,使用这种方法存放图像数据,用户可以在图像数据全部收到之前这幅图像的全貌,而不觉得等待时间太长。

图像信号是一种模拟信号,计算机要对它进行处理,必须将它转换成为数字图像信号,即用二进制数字的编码形式来表示图像,转换过程一-般称为A/D转换(模数转换)。将图像播放出来,需进行D/A转换(数模转换)。

 

 

 

7、 在面向对象技术中,对象具有以下特性:(①②④)。
①清晰的边界②良好定义的行为③确定的位置和数量④可扩展性

A:②④
B:①②③④
C:①②④
D:①②


【解析】:
在面向对象技术中,对象是基本的运行时的实体,它既包括数据(属性),也包括作用于数据的操作(行为)。
一个对象把属性和行为封装为一个整体,与其他对象之间有清晰的边界,有良好定义的行为和可扩展性
对象位置和数量,由使用其的对象或系统确定。


 
 

 

8、在屏蔽软件错误的容错系统中,冗余附加技术的构成不包括(关键程序和数据的冗余存储及调用)。

A:关键程序和数据的冗余存储及调用

B:冗余备份程序的存储及调用

C:实现错误检测和错误恢复的程序

D:实现容错软件所需的固化程序

 

 

【解析】:

冗余附加技术是指为实现结构、信息和时间冗余技术所需的资源和技术,包括程序、指令、数据、存放和调动它们的空间和通道等。

在屏蔽硬件错误的容错技术中,冗余附加技术包括:关键程序和数据的冗余及调用:检测、表决、切换、重构和复算的实现。

在屏蔽软件错误的容错技术中,冗余附加技术包括:冗余备份程序的存储及调用:实现错误检测和错误恢复的程序:实现容错软件所需的固化程序。

 

 

 

 

9、 UML中接口可用于(声明对象类所需要的服务)。
A:提供构造型(stereotype)名称为《interface》的具体类
B:Java和C++程序设计中,而C#程序设计中不支持
C:定义可以在多个类中重用的可执行逻辑
D:声明对象类所需要的服务


【解析】:
在采用UML进行面向对象系统建模时,会用UML中构造型(stereotype) 名称为《interface》来表示接口这一概念,声明对象类所需要的服务,而服务具体如何执行,有实现它的具体类完成。

 
 
 
10、 以下关于程序错误的叙述中,正确的是(编译正确的程序必然不包含语法错误)。
A:编译正确的程序必然不包含语法错误
B:编译正确的程序必然不包含语义错误
C:除数为0的错误可以在语义分析阶段检查出来
D:除数为0的错误可以在语法分析阶段检查出来


【解析】:

编译程序的工作过程可以分为词法分析、语法分析、语义分析、中间代码生成、代码优化和目标代码生成等阶段。

用户编写的源程序不可避兔地会有一些错误,这些错误大致可分为静态错误和动态错误

动态错误也称:动态语义错误,它们发生在程序运行时,例如变量取零时作除数、引用数组元素下标错误等。

静态错误是指:编译阶段发现的程序错误,可分为语法错误和静态语义错误,如单词拼写错误、标点符号错、表达式中缺少操作数、括号不匹配等有关语言结构上的错误称为语法错误,而语义分析时发现的运算符与运算对象类型不合法等错误属于静态语义错误。

 

 

 

11、将数组{1,1,2,4,7,5}从小到大排序,若采用(直接插入)排序算法,则元素之间需要进行的比较次数最少,共需要进行(6)次元素之间的比较。

A:直接插入
B:归并
C:堆
D:快速

A:5

B:6

C:7

D:8

 

【解析】:

输入数组{1, 1, 2,4,7, 5}基本有序(从小到大),在这种情况下,插入排序算法的时间复杂度为0(n),归并排序和堆排序的时间复杂度为0(nlgn),而快速排序的时间复杂度为0(n2)

用插入排序算法排序该输入数组,第二个元素1需要和第一个元素1进行1次比较,第三个元素2需要和第二个元素1进行1次比较,第四个元素4需要和第三个元素2进行1次比较,第五个元素7需要和第四个元素4进行1次比较,第六个元素5需要和第五个元素7进行1次比较,比7小,和元素7交换,在和第四个元素4进行1次比较,得到最终的排序结果。因此一共需要进行6次比较。

 

 

 

12、霍夫曼编码将频繁出现的字符釆用短编码,出现频率较低的字符采用长编码。具体的操作过程为:i)以每个字符的出现频率作为关键字构建最小优先级队列;ii)取出关键 字最小的两个结点生成子树,根节点的关键字为孩子节点关键字之和,并将根节点插入到最小优先级队列中,直至得到一颗最优编码树。
霍夫曼编码方案是基于(贪心)策略的。用该方案对包含a到f六个字符的文件进行编码,文件包含100,000个字符,每个字符的出现频率(用百分比表示)如下表所示,则与固定长度编码相比,该编码方案节省了(21%)存储空间。

 A:分治
B:贪心
C:动态规划
D:回溯

A:21%

B:27%

C:18%

D:36%

 

【解析】:

霍夫曼编码在构造最优编码树时,每次总是取出权值最小的两个结点来生成它们的父结点(新的中间结点),因此霍夫曼编码方案是基于贪心策略的。


对应该实例构造最优编码树如下图所示。


实例中包含6个字符,若用定长编码,则需要三位,对包含100, 000个字符的文件,需要
3*100, 000-300, 000位的存储空间。而采用霍夫曼编码,则需要 (18+26+32)  *2+12*3+(4+8) *4 = 236, 000位的存储空间,节省了21%的存储空间。

 

 

 

13、在ASP的内置对象中, (response)对象可以修改cookie中的值。

A:request

B:response

C:application

D:session

 

【解析】:

在ASP的内置对象中,response 对象和request对象和cookie有关。其中,

request对象中的Cookies集合是服务器根据用户的请求,发出的所有cookie的值的集合,这些Cookie仅对相应的域有效,每个成员均为只读。

Response 对象中的Cookies集合是服务器发回客户端的所有Cookie的值,这个集合为只写,所以只有Response对象可以修改cookie中的值。

 

 

 

 14、分配给某公司网络的地址块是220.17.192.0/20,该网络被划分为(16)个C类子网,不属于该公司网络的子网地址是(220.17.213.0)。
A:4
B::8
C:16
D:32

A:220.17.203.0
B:220.17.205.0
C:220.17.207.0
D:220.17.213.0

【解析】:
220.17.192. 0是一个C类网络地址,应该有24位子网掩码,现在仅采用20位子网掩码,少了4位,所以被划分成了16 个子网。
 
这16个子网号的第三个字节都应该在192+0~ 192+15之间, 由于213大于192+15,所以220. 17. 213.0不属于地址块220. 17. 192. 0/20。


 
 
 
15、 如果DNS服务器更新了某域名的IP地址,造成客户端域名解析故障,在客户端可以用两种方法解决此问题,其中一种是在Windows命令行下执行(ipconfig/flushdns)命令。
A:ipconfig /all
B:ipconfig /renew
C:ipconfig/flushdns
D:ipconfig/release


【解析】:

ipconfig命令详解如下:

①具体功能

该命令用于显示所有当前的TCP/IP网络配置值、刷新动态主机配置协议(DHCP)和域名系统(DNS)设置。使用不带参数的IPCONFIG可以显示所有适配器的IP地址、子网掩码、默认网关。

②语法详解

ipconfig [/al1] [/renew [adapter] [/release [adapter] [/flushdns] [/displaydns][/registerdns] [/showc lassidpadapter] [/setclassidpadapter] [classID]

③参数说明

/all显示所有适配器的完整TCP/IP配置信息。在没有该参数的情况下IPCONFIG只显示IP地址、子网掩码和各个适配器的默认网关值。适配器可以代表物理接口(例如安装的网络适配器)或逻辑接口(例如拨号连接)。

/renew更新所有适配器(如果未指定适配器),或特定适配器(如果包含了adapter参数)的DHCP配置。该参数仅在具有配置为自动获取IP地址的网卡的计算机上可用。要指定适配器名称,请输入使用不带参数的IPCONFIG命令显示的适配器名称。

/release[adapter]发送DHCPRELEASE消息到DHCP服务器,以释放所有适配器(如果未指定适配器)或特定适配器(如果包含了adapter参数)的当前DHCP配置并丢弃IP地址配置。该参数可以禁用配置为自动获取IP地址的适配器的TCP/IP.要指定适配器名称,请键入使用不带参数的IPCONFIG命令显示的适配器名称。

/flushdns清理并重设DNS客户解析器缓存的内容。如有必要,在DNS疑难解答期间,可以使用本过程从缓存中丢弃否定性缓存记录和任何其他动态添加的记录。

DNS Client 服务为计算机解析和缓存DNS名称。为了要达到用最快速、最有效率的方式,

让客户端能够迅速找到网域的验证服务,在Win2000/XP系统中,加入了DNS快取(Cache) 的功能。当第一次在找到了目的主机的IP地址后,操作系统就会将所查询到的名称及IP地址记录在本机的DNS快取缓冲区中,下次客户端还需要再查询时,就不需要到DNS服务器上查询,而直接使用本机DNS Cache 中的数据即可,所以你查询的结果始终是同一IP地址。这个服务关闭后,dns还可以解析,但是本地无法储存dns缓存。

 

 

Guess you like

Origin www.cnblogs.com/sunjiaojiao/p/11583370.html