midterm_exam

advertisement
Introduction of Computer Science
Class:
Midterm Exam
2014/11/27
Student ID:
9:10~12:00
Name:
1. Use hexadecimal notation to represent the following bit patterns:
a. 0110101011110010
b. 111010000101010100010111
c. 01001000
2. What bit patterns are represented by the following hexadecimal patterns?
a. 5FD97
b. 610A
c. ABCD
d. 0100
3. Convert each of the following binary representations to its equivalent base ten
form:
a. 0101
b. 1001
c. 1011
d. 0110
e. 10000
f. 10010
4. Convert each of the following base ten representations to its equivalent binary
form:
a. 6
b. 13
c. 11
d. 18
e. 27
f. 4
5. Suppose a machine stores numbers in two's complement notation. What are the
largest and smallest numbers that can be stored if the machine uses bit patterns of
the following lengths?
a. four
b. six
c. eight
6. Can overflow ever occur when values are added in two's complement notation
with one value positive and the other negative? Explain your answer.
7. The following bytes were originally encoded using odd parity. In which of them do
you know that an error has occurred?
(a) 100101101
(b) 100000001
(c) 000000000
(d) 111000000
(e) 011111111
8. Express each of the following values in binary notation:
3
a. 5 4
15
b. 15 16
3
c. 5 8
1
d. 1 4
5
e. 6 8
9. 1
XNOR 0 = ?
10. What does a flip flop do?
11. What is the advantage of Solid State Disk (SSD) as compared to the traditional
disk? Please name one.
12. Why we need to use ‘buffer’? Please name one application of the buffer.
13. What is the possible problem when using a fixed-size bit stream to represent a
number? Please name one.
14. What is the binary representation of 375?
15. What’s the two’s complement notation for -7?
(a) 1000
(b) 1001
(c) 1010
(d) 1011
16. Huffman coding is based on
(a) Frequency-dependent encoding
(b) Run-length encoding
(c) Dictionary encoding
(d) Relative encoding
17. What is the difference between stationary dictionary encoding and adaptive
dictionary encoding?
18. What will be the parity bit for the following bit stream “0010110”?
19. What is the hamming distance between “00110010” and “10110001”?
20. Please briefly describe what is the ‘overflow’ problem when adding two numbers.
21. A right circular shift of 3 bits on a string of 8 bits is equivalent to a left circular
shift of how many bits?
22. What are the steps of events that might be required when moving the contents
of one memory cell to another memory cell in a computer?
23. Suppose a satellite system is being used to receive a serial data stream at 250
Kbps. If a burst of atmospheric interference lasts 6.96 seconds, how many data bits
will be affected?
24. Distinguish between MIMD architecture and SISD architecture.
25. How would pipelining increase a computer's throughput?
26. Please briefly describe the 3 components in the turning machine and their
functions.
27. How many types of registers in a computer?
(a) 1
(b) 2
(c) 3
(d) 4
28. What is the difference between RISC and CISC architecture? Please briefly
describe it.
29. What is the function of a program counter?
30. Please briefly describe how the addition “3 + 9” is performed in memory.
31. Assuming that we use 16 bits to store a machine instruction: the first 4 bits are
0011 which means “storing the contents of a register in a memory cell” ; the second
4 bits identify the register whose contents are to be stored; and the remaining 8 bits
identifies the address of the memory cell that is to receive data. Based on the above,
what can you do with this machine instruction “0011010110100111”?
32. What is the function of ‘op-code’?
33. What is the result of logic right-shift of 10010100?
34. Which phase in the machine cycle involves the use of memory?
35. There are several architectures that have been proposed to improve the speed of
a computer. Please name one.
36. What is virtual memory?
37. What is a process table in an operating system used for?
38. What is the role of the scheduler in a multitasking operating system?
39. Suppose a computer contained 512MB (MiB) of main memory, and an operating
system needed to create a virtual memory of twice that size using pages of 2KB (KiB).
How many pages would be required?
40. What is a semaphore?
41. How is spooling used in an operating system?
42. Identify the use of a queue in the process of spooling output to a printer.
43. What problem arises as the lengths of the time slices in a multiprogramming
system are made shorter and shorter? What about as they become longer and
longer?
44. Please briefly describe what’s a time-sharing computer system.
45. What is the load-balancing issue for a multi-core computer? Please briefly
describe it.
46. What is the use of a device driver?
47. What is a file descriptor?
48. What is the issue of using fixed-size partition?
49. What is the possible swapping rule for virtual memory? Please name one.
50. Please use some examples to explain the difference between different swapping
rules: Oldest first, LFU, LRU.
51. What does ‘thrashing’ mean? And why it is not good?
52. Which swapping rule is used by Linux?
(a) Oldest first
(b) LFU
(c) LRU
(d) None of the above
53. Please briefly describe the booting process.
54. Please briefly describe the difference between ‘program’ and ‘process’.
55. Please briefly describe the function of a dispatcher.
56. Which is the following information is not kept in the process table?
(a) Process state
(b) Process priority
(c) Memory used by the process
(d) Power consumption of the process
57. What is the function of an interrupt handler?
58. Please briefly describe what is ‘context switch’.
59. What could be the potential problem for using a flag to control the access of a
resource?
60. What are the conditions that can cause the so-called deadlock?
61. What are the possible solutions to avoid deadlock? Please name one.
62. What is the DNS?
63. Describe the steps followed by a machine that wants to transmit a message in a
network using the CSMA/CD protocol.
64. What is the distinction between an intranet and an internet?
65. In what way could TCP be considered a better protocol for implementing the
transport layer than UDP? In what way could UDP be considered better than TCP?
66. Which one of the following network topology is more fault-tolerant?
(a) Bus
(b) Star
(c) Ring
67. Please briefly explain the differences between a bridge and a router.
68. Please briefly explain the differences between an Ethernet hub and an Ethernet
switch.
69. What is a ‘domain’?
70. What does 192.207.0.0/16 mean?
71. What is a loopback address?
72. What are the functions of a web browser?
73. Please explain the differences of HTML and XML?
74. Please briefly explain the concept of network layering.
75. Please briefly explain the CSMA protocol used by the Ethernet.
76. Please show the routing table (final state) of each node in the following topology.
A-B-C-D-E
77. Please briefly describe how TCP ensure reliability of data transmission.
78. Please briefly describe how public-key encryption can be used to ensure privacy
of data communication.
79. Why do we need a modem?
80. What factors could affect your network bandwidth? Please name one.
Download