You are on page 1of 14

Computers and Software Engineering A, 15 credits, DV006A
Midterm Exam
Time: Wednesday, January 16, 2008
Place: 51:525A
Duration: 3 hours

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,
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!

Section 1. Questions with Multiple Choice Answers (There are 25 questions
in this section each worth 1 point apiece.)
Answer these questions with only one letter!

Chapter One (Data Representation)

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

1.2 What is the result of the binary operation 11110000 XOR 11110000?

A. 11110000 B. 10100101 C. 00000000 D. 11110101

1.3 Which of the following bit patterns represents the decimal integer value 31?

10Which of the following instructions falls into the category of data transfer instructions? A. 37BB ANSWER: C 1. 2 ANSWER: D Chapter Two (Data Manipulation) 1. 00011111 ANSWER: D 1.5 How many bytes are there in a Unicode character? A. JUMP B. 1A00 B.8 Which of the following instructions (as described in the Appendix 1: language description table) places 00000000 in register A? A.9 Which of the following instructions (as described in the Appendix 1: language description table) changes the contents of register 7? A. an address C. 12 C. the instruction register contents ANSWER: B 1. 45 ANSWER: B 1. 5. A.75 D.6 When a STORE operation is performed. 16 D.625 C. what information besides the data to be stored must be sent over the bus to main memory by the CPU? A. 5. 00001111 C. 4057 D. LOAD D. 200A ANSWER: B 1. 5. 8 B. 00010110 D. 00011010 B. ROTATE C. AND ANSWER: C . 10AB B. the contents of register 0 D. 4075 C. 40AB ANSWER: B 1. the program counter contents B. 4077 B.4 What is the base ten value of the binary fraction 101. 2A00 C. 30AB C.101? A. 20AB D.7 Which of the following instructions (as described in the Appendix 1: language description table) changes the contents of a memory cell? A. 3A00 D.101 B.

Application B. Domain D.19Which of the following is not a means of connecting networks? A.20Which of the following identifies the application to which a message arriving from the Internet should be given? A. do-while B. X ← 3.18Which layer of the TCP/IP hierarchy directs message segments through the Internet so that they get closer and closer to their destination? A. X ← 3.23Which of the following Java statements is guaranteed to loop at least one time? A. X ← 3. Process ANSWER: C 1. B. Transport ANSWER: D 1. Bridge ANSWER: B 1. for . Port number C. strict sense? A. Network D. Server C. Switch B. Hop count ANSWER: B Chapter Five (Algorithms) 1. Algorithm B. Protocol B. Router D. Program C.21Which of the following is an activity? A.17Which layer of the TCP/IP hierarchy reassembles messages as their pieces arrive at the destination? A. C. Application B. Link ANSWER: C 1. Transport C.1) ANSWER: B 1. while C. Network D.1.22Which of the following set of instructions defines an algorithm in the formal. Link C. while (X < 5)do while (X < 5) do while (X < 5) do (X ← X) (X ← X + 1) (X ← X .

Oliver ANSWER: B . Maurice B. Maurice B.25When searching within the list Lewis. Oliver ANSWER: C 1. Maurice. Oliver. Quincy. Roger which of the following entries will take the most time to find using the binary search algorithm? A. Nathan C. Pat. Quincy. Roger which of the following entries will take the most time to find using the sequential search algorithm? A.ANSWER: A 1. Oliver. Pat. Nathan C. Nathan.24When searching within the list Lewis. Maurice. Nathan.