第1頁共6頁
計算機概論
期中考
系級: 座號: 姓名:
一、是非題(每題1分)
( )1.Every computer today is based on the von Neumann model.
( )2. A computer is a programmable data processor that accepts input data and programs and outputs data.
( )3. Memory, arithmetic logic unit,control unit, and program are the four subsystems of the von Neumann model.
( )4. The von Neumann model states that the program must be stored in memory.
( )5. A program is made of a finite number of instructions andthese instructions are executed sequentially.
( )6.A step-by-step solution to a program is called an algorithm.
( )7. A byte is 8 bits.
( )8.A byte is the smallest unit of data that can be stored in a computer.
( )9. Complementing a number means to convert each 1 to 0 and each 0 to 1.
( )10. There are two 0s in sign-and-magnitude representation.
( )11. In sign-and-magnitude representation, the leftmost bit defines the sign of the number.If it is 0, the number isnegative.If it is 1, the number is positive.
( )12.Unsigned numbers are commonly used for counting and addressing.
( )13. If a computer has 64 MB (megabytes) of memory, it means we need 25bits to address each byte.
( )14. The 80-20 rule means most computers spend 80 percent of the time accessing only 20 percent of the data.
( )15.The CPU has only three parts: an ALU, a control unit, and a cachememory.
( )16.A magnetic disk is considered a random access device.
( )17.The seek time of a disk defines the time to move data from the disk to the CPU/memory.
( )18. The capacity of DVD is about 650MB.
( )19.The CPU and memory are normally connected by three groups of wires, each called a bus: data bus, address bus, and control bus.
( )20. The term overflow describes a condition in which a number is not within the range defined by the bit allocation.
( )21.In the isolated I/O, all memory instructions can be used by the I/O devices.
( )22.A simplified machine cycle can consist of three steps: fetch, encode, and execute.
( )23. A model is a set of rules that controls the interaction of different devices in a network or internetwork.
( )24.To set a bit in a target bit pattern, set the corresponding mask bit to 1 and use the AND operator.
( )25. A computer network is a combination of devices connected by transmission media.
( )26. A protocol is a set of rules that controls the interaction of different devices in a network or internetwork.
( )27. The application layer of the OSI model enables a person to access the network.
( )28.In extended ASCII, each symbol is 7 bits.
( )29. Bridges operate at the first three layers of the OSI model.
( )30. A gateway is a connecting device that acts as a protocol converter.
( )31. Multiprogramming means there are multiple CPUs on the same machine.
( )32. A modern operating system has at least four duties: memory manager, process manager, device manager, and file manager.
( )33. The smallest storage area on a magnetic disk that can be accessed at one time is a frame.
( )34. Paging is a memory management technique belonging to the swapping category.
( )35.A job is a program in execution.
( )36. A program becomes a process when selected by the operating system and brought to the hold state.
( )37. Starvation occurs when the operating system does not put resource restrictions on processes.
( )38. The sum of the sizes of all the programs in memory is virtual memory.
( )39.Jobs and processes wait in queues.
( )40. The device manager controls access to I/O devices.
( )41. An algorithm is an ordered set of ambiguous steps that produces a result and terminates in a finite time.
( )42. A program is a combination of sequence constructs, decision constructs, and repetition constructs.
( )43. Pseudocode is an Englishlike representation of an algorithm.
( )44. Binary search is used for unordered lists.
( )45.An iterative algorithm involves the algorithm itself.
( )46.The only language understood by a computer is machine language.
( )47. In a functional language, the algorithm is mathematical in nature. Prolog is a functional language.
( )48. An expression is a sequence of operands and operators that reduces to a single value.
( )49. A statement is a name for a memory location.
( )50.The steps to building a program include writing, editing, compiling and linking code.
系級: 座號: 姓名:
二、選擇題 (每題1分)
( )1. A step-by-step solution to a problem is called .
(A) hardware(B) an operating system
(C) a computer language(D) an algorithm
( )2. is a protocol for mail services.
(A) FTP(B) SMTP(C) TELNET(D) HTTP
( )3. The IP address is currently bits in length.
(A) 4(B) 8(C) 32(D) any of the above
( )4. The precision of the factional number stored in a computer is defined by the
(A) sign(B) exponent(C) mantissa(D) any of the above
( )5. Which topology uses a hub or switch?
(A) bus(B) ring(C) star(D) all of the above
( )6. A operating system is needed for jobs shared between distant connected computers.
(A) batch(B) time-sharing
(C) parallel(D) distributed
( )7. Multiprogramming requires a operating system.
(A) batch(B) time-sharing
(C) personal(D) distributed
( )8. When you want to download music to a computer, the audio signal must be .
(A) sampled(B) quantized
(C) coded(D) all of the above
( )9. The data in are erased if the computer powered down.
(A) RAM(B) ROM(C) a tape drive(D) a CD-ROM
( )10. The manager of operating systems is responsible for searching and backup.
(A) memory(B) process(C)device(D) file
( )11. The construct tests a condition.
(A) sequence(B) decision(C) repetition(D) logical
( )12. can occur if a process has too many resource restrictions.
(A) Starvation(B) Synchronization
(C) Paging(D) Deadlock
( )13. is a common language in the business environment.
(A) FORTRAN(B) COBOL(C) C++(D) LISP
( )14. is a basic algorithm in which you want to find the location of a target in a list of items.
(A) Sorting(B) Searching
(C) Product(D) Recursion
( )15. is a basic algorithm that arranges data according to their values.
(A) Sorting(B) Searching
(C) Product(D) Recursion
( )16. is a memory type with traditional flip-flop gates to hold data.
(A)SRAM(B) DRAM(C) ROM(D) all of the above
( )17. In Excess_X number representation, what is usually the relationship between X and N, the bit allocation?.
(A) X = 2N-1(B) X = 2N+1(C) X = 2N-1-1(D) X = 2N-1+1
( )18. The software used to write a program is called a .
(A) preprocessor(B) text editor
(C) linker(D) loader
( )19. The assembles precompiled units from different sources into an executable program.
(A) preprocessor(B) text editor
(C) linker(D) loader
( )20. is a pictorial representation of an algorithm.
(A) A flowchart(B) A structure chart
(C) Pseudocode(D) An algorithm
三、計算題:(每題2分,第十四題4分)
- What is the bit pattern for x2A34?
Ans:
- Show the octal equivalent of the bit pattern 1110101110010.
Ans:
- Convert the decimal number 135 to binary.
Ans:
- Store –135 in a 16-bit memory location using two’s complement representation.
Ans:
系級: 座號: 姓名:
- Interpret 10110110 in decimal if the number was stored as a one’s complement integer.
Ans:
- Use a mask to flip the 5 leftmost bits of a pattern. Test the mask with the pattern 10100110.
Ans:
Target1 0 1 0 0 1 1 0
Mask
------
Result
- Use a mask to unset (clear) the 5 rightmost bits of a pattern. Test the mask with the pattern 10100110.
Ans:
Target1 0 1 0 0 1 1 0
Mask
------
Result
- Change the following decimal fractions into binary fractions.
112.640625
Ans:
- Interpret the following 32-bit floating-point number
1 10001101 01000111001000000000000
Ans:
- Show the result of the following operation. (show the bit pattern)
x99 XOR xFF
Ans:
- Show the result of the following operation. (show the bit pattern)
NOT x99
Ans:
- Show the result of the following operations using IEEE format.
x9111111 + x211111
Ans:
- Write an algorithm to solve the factorial problemrecursively.
Ans:
Factorial
Input: A positive integer num
- if (num is equal to 0)
then
1.1 return
else
1.2 return
End if
End
- (4分) Using the bubble sort algorithm, manually sort the following list and show your work in each pass: 14 7 1 31 40 46 78 9 2
Ans:
(1)14 7 1 31 40 46 78 9 2
(2)1
(3)1 2
(4)1 2 7
(5)1 2 7 9
(6)1 2 7 9 14
(7)1 2 7 9 14 31
(8)1 2 7 9 14 31 40
(9)1 2 7 9 14 31 40 46
(10)1 2 7 9 14 31 40 46 78
1