=========================preview======================
(COMP111)COMP180-final-02-sol.pdf
Back to COMP111 Login to download
======================================================
Hong Kong University of Science & Technology
Final Examination, Spring 2002
Computer Organization(COMP 180)
Time allowed: 2 hour 30 minutes Closed books/notes
Name:_____________________________________ Student Number: ____________________
Email: _____________________________ Lecture Section:_________ Lab Section:_______
Instructions:
1.
This examination paper consists of 14 pages and 8 questions.
2.
Please write your name, student ID and Email on this page.
3.
For each subsequent page, please write your student ID at the top of the page in the space provided.
4.
Please answer all the questions within the space provided on the examination paper. You may use the back of the pages for your rough work.
5.
Please read each question very carefully and answer the question clearly and to the point. Make sure that your answers are neatly written, readable and legible.
6.
Show all the steps you use in deriving your answer, wherever appropriate.
7.
For each of the questions, you should concentrate on what is asked. Get to the point. There is no need to define or describe related but unimportant concepts unless you are explicitly asked to do so.
Question
Points
Score
1
9
2
10
3
20
4
15
5
10
6
13
7
8
8
15
TOTAL
100
Question 1 (9 marks): True or False
(a)
MOV [BX],[DX] copies 1 byte from memory location True___ False__X_
DS:[DX] to memory location DS:[BX]
(b)
MOV AX, BL copies the byte from BL to the lowest True___ False__X_
order byte of AX
(c)
MOV AX, [SP] copies one word from memory location True___ False__X_
DS:[SP] to the accumulator AX
(d)
Twos complement is not used in the IEEE 754 floating- True__X_ False___
point representation for representing signed integers.
(e)
SRAM is less costly per bit than DRAM. True___ False__X_
(f)
Arithmetic operations in MIPS can directly operate on True___ False__X_
values stored in memory.
(g)
The microprogramming approach to controlling the datapath True___ False__X_
in a computer is faster than the finite state control technique.
(h)
The output of sequential logic depends only on the input True___ False__X_
values.
(i)
A block of data (usually several words) is transferred True___ False__X_
to the cache at a time (instead of a byte or a word)
because of the principle of temporal locality.
Question 2 (10marks): MIPS
Assume that the following MIPS code is a procedure that takes one input