Академический Документы
Профессиональный Документы
Культура Документы
Exam aids: This is a closed-book exam. The only student materials allowed are pencils,
erasers and an English-Chinese dictionary.
General Instructions: Write your answers on separate sheets of paper and do not write your
answers on the pages of the exam. Start each section of the exam on a new sheet of paper.
Write on only one side of each answer sheet and put your name at the top of each answer
sheet. If the question is unclear to you, explain the ambiguity and your interpretation of the
question in your answer. Try to answer all of the exam questions and use illustrations in order
to get partial credit for the question. However, if the question asks for exactly two responses,
do not answer with three or more alternative answers.
Note that some of the questions related to Chapter 2 (Data Manipulation) refer to
Appendix 1: language description table on the last page of this exam.
Scoring: There are a total of 75 questions and a maximum of 100 points in this exam. At least
50% of the maximum number of points must be scored in order to get a passing grade. The
ECTS scale will be used on all passing grades (i.e., grades of A, B, C, D and E will be given).
The questions are not listed in order of difficulty.
GOOD LUCK!
1.1 Which of the following Boolean operations produces the output 0 for the fewest number of
input patterns?
A. AND B. OR C. XOR
ANSWER: B
1.2 What is the result of the binary operation 11110000 XOR 11110000?
ANSWER: C
1.3 Which of the following bit patterns represents the decimal integer value 31?
A. 00011010 B. 00001111 C. 00010110 D. 00011111
ANSWER: D
1.4 What is the base ten value of the binary fraction 101.101?
ANSWER: B
A. 8 B. 12 C. 16 D. 2
ANSWER: D
1.6 When a STORE operation is performed, what information besides the data to be stored
must be sent over the bus to main memory by the CPU?
ANSWER: B
1.7 Which of the following instructions (as described in the Appendix 1: language description
table) changes the contents of a memory cell?
ANSWER: B
1.8 Which of the following instructions (as described in the Appendix 1: language description
table) places 00000000 in register A?
ANSWER: B
1.9 Which of the following instructions (as described in the Appendix 1: language description
table) changes the contents of register 7?
ANSWER: C
1.10Which of the following instructions falls into the category of data transfer instructions?
ANSWER: C
Chapter Three (Operating Systems)
ANSWER: A
ANSWER: A
ANSWER: D
ANSWER: A
ANSWER: C
ANSWER: C
1.17Which layer of the TCP/IP hierarchy reassembles messages as their pieces arrive at the
destination?
ANSWER: D
1.18Which layer of the TCP/IP hierarchy directs message segments through the Internet so that
they get closer and closer to their destination?
ANSWER: C
ANSWER: B
1.20Which of the following identifies the application to which a message arriving from the
Internet should be given?
ANSWER: B
ANSWER: C
1.22Which of the following set of instructions defines an algorithm in the formal, strict sense?
A. X ← 3; B. X ← 3; C. X ← 3;
while (X < 5)do while (X < 5) do while (X < 5) do
(X ← X) (X ← X + 1) (X ← X - 1)
ANSWER: B
1.23Which of the following Java statements is guaranteed to loop at least one time?
which of the following entries will take the most time to find using the sequential search
algorithm?
ANSWER: C
which of the following entries will take the most time to find using the binary search algorithm?
ANSWER: B
Section 2. Fill-in-the-blank/Short-answer Questions (There are 25 questions
in this section each worth 2 points apiece.)
Answer these questions with words, numbers and/or sentences.
Chapter One (Data Representation)
ANSWER: B49E
2.3 How many different bit patterns can be formed if each must consist of exactly 10 bits?
2.4 What is the largest numeric value that could be represented with three bytes if each digit
were encoded using one ASCII pattern per byte? What if binary notation were used? (Just
give an expression for the numeric value; you do not need to calculate the actual value.)
ANSWER: With ASCII, the largest numeric value is 999. With binary notation, the largest
value is 2**24 = 16,777,215.
2.5 Suppose a digital camera has a storage capacity of 256MB. How many photographs could
be stored in the camera if each consisted of 1024 pixels per row and 1024 pixels per
column if each pixel required three bytes of storage?
ANSWER: If each pixel required one byte, a single picture would require 1024 X 1024 =
1MB. However, since each pixel requires 3 bytes then each picture requires 3MB of storage.
256MB/3MB = 85 pictures (with 1MB to spare).
2.6 If register 0 contains the pattern 01101001 before executing the instruction A503 (see the
language description table), what bit pattern will be in register 0 after the instruction is
executed?
ANSWER: register 0 will still contain the bit pattern 01101001 since the instruction A503
rotates the data in register 5.
2.7 Can AND-operations be performed directly on memory cells? Explain your answer!
ANSWER: No. The only operations that can be performed on memory cells are LOAD (from
memory cell to register) and STORE (from register to memory cell). Data must reside in a
register before it can be manipulated by a binary operation such as AND.
2.8 Encode each of the following commands in terms of the machine language described in
Appendix 1: language description table.
A. LOAD register 7 with the value A5.
B. LOAD register 7 with the contents of the memory cell at address A5.
C. ADD the contents of registers 5 and 6 as thought they were values in two’s
complement notation and leave the result in register 4.
2.9 What are the three operations performed during each machine cycle?
2.10Using the machine language described in the language description table, write a sequence
of instructions that will place the pattern FF in the memory cell at address A0.
ANSWER: 2XFF, 3XA0 (where X can be any register but must be the same in both
instructions)
2.12Suppose an operating system allocates time slices in 10 millisecond units and the time
required for a context switch is negligible.
B. How many processes can obtain a time slice in one second if half of them use only
half of their slice?
ANSWER: Multitasking means that a number of tasks are run at the same time. Time-sharing
allows tasks to share a single CPU by giving each task a time-slice.
2.14What is the difference between a process that is waiting as opposed to a process that is
ready?
ANSWER: A process that is waiting would not be able to advance if given a time slice
(perhaps because it is waiting for a peripheral device to complete a task) whereas a process
that is ready would be able to continue execution if given a time slice.
ANSWER: System software provides the infrastructure required by the application software. It
includes the operating system and utilities. Application software provides the unique
functionality required to perform the particular tasks for with the computer is used. Examples
include word processors, spreadsheet systems, database systems, and image processing
systems.
2.16Write the entire URL required to retrieve the Web document named bulldogs.html from
the Web server at animals.org assuming that the document is stored in the directory named
dogs.
ANSWER: http://animals.org/dogs/bulldogs.html
2.17What are two basic differences between the transport level protocols named UDP and
TCP?
ANSWER: Possible answers include: name server, file server, mail server, Web server,
etc.
2.19Many people use the terms Internet and world-wide web interchangeably. What is the
difference between the Internet and the world-wide web?
ANSWER: The Internet is the infrastructure used by the world-wide web. That is, the world-
wide web is only one application of the Internet. Other applications include email, ftp, and
telnet.
ANSWER: HTTP (HyperText Transfer Protocol) is a protocol used mainly to transfer files
containing HTML-coded (HyperText Markup Language). HTML-tags are inserted into the
text file to tell the web-browser how to display the text.
Chapter Five (Algorithms)
2.21What sequence of values will be printed when the following instructions are executed?
X ← 10;
while (X < 7) do
(print the value of X;
X ← X + 1)
print the value of X;
while (X > 2) do
(print the value of X;
X ← X - 2)
2.22Suppose the binary search algorithm was being used to search for the entry Feng in the list
What would be the first entry in the list to be considered? What would be the second entry in
the list to be considered?
ANSWER: A. Li B. Fu
X ← 5;
print the value of X;
Y ← 3;
if (X < Y) then (print the value 6)
else (print the value of X)
ANSWER: 5, 5
X ← 9
while (X > 8) do
(X ← X + 2)
ANSWER: The loop will never termination.
Section 3. Vocabulary (Matching) Questions (There are 25 questions in this
section each worth 1 point apiece.)
Answer these questions with the one letter of the word in the list that best
matches the description.
Chapter One (Data Representation)