Professional Documents
Culture Documents
FINAL EXAM
December 2013
Course Name & No.:
Section(s):
A01, A02
CRN:
10388, 10389
Instructor:
Kin Fun Li
Duration:
3 hours
NAME:
STUDENT NUMBER: V00________________
This exam has a total of ?? pages including this cover sheet, ?? pages of formulas
and ? pages of questions
Students must count the number of pages and report any discrepancy immediately
to the Invigilator.
This exam is to be answered:
o On the paper
Materials Allowed: Calculator (All types)
Marking Scheme: Total marks: 45.
Answer all questions.
Justify your answers if you feel it is necessary, even for
multiple-choice questions.
Make and state appropriate assumptions.
#value
Ri
LOC
(Ri)
(LOC)
X(Ri)
operand=value
EA= Ri
EA=LOC
EA=[Ri]
EA=[LOC]
EA=[Ri]+X
1. To push an item on top of the stack, the instruction Move NEWITEM, +(SP) is used, circle the correct
answers:
1(a) This stack grows from ( lower / higher ) address to ( lower/higher ) address in memory.
1(b) This stacks pointer SP is pointing to a ( valid / useless ) item on the stack.
2. The stack of one implementation grows from low address to high address, and the current stack pointer
is pointing to a valid item on the top of the stack. When an item is popped from the stack, should we predecrement, pre-increment, post-decrement, or post-increment the stack pointer?
3. Consider the following equation as a way to measure the performance of a computer implementation
using a particular benchmark:
Performance=1/(Number-of-Executed-Instructions*Cycle-Time*Average-Number-of-Cycles/Instruction)
To maximize performance, one has to minimize the parameters in the denominator of the above equation.
Suggest two (2) ways to minimize each of these parameters.
4a. The interrupt service routine usually involves data transfer between an input/output device and the
memory, and it seldom performs extensive computation. Offer an explanation why this is the case.
4b. What is the most important register to save before entering an ISR in step (ii) above?
5. How do we know a particular memory device is classified as primary or secondary memory?
6.Assume a primary memory has 2k words, each word has 2m bits, and access is on word boundary only.
6a. How many bits must the memory address register (MAR) be?
6b. How many bits must the memory data register (MDR) be?
7a. What is the decimal value if 1011 is a signed integer represented in sign and magnitude?
7b. What is the decimal value if 1011 is a signed integer represented in ones complement?
7c. What is the decimal value if 1011 is a signed integer represented in twos complement?
END