TTTK 2833 - Assignment 3 (Question)

Assignment 3 (Individual Assignment)
Due on 11th February 2010

1. List then briefly explain five important instruction set design issues.

2. What is the difference between big endian and little endian?

3. What is the difference between an arithmetic shift and a logical shift?

4. Briefly define the followings:
a. Immediate addressing
b. Direct addressing
c. Indirect addressing
d. Register addressing
e. Register indirect addressing
f. Displacement addressing
g. Relative addressing

5. Consider a 16-bit processor in which the following appears in main memory, starting at location 200:
200 Load to AC Mode
201 500
202 Next instruction
The first part of the first word indicates that this instruction loads a value into an accumulator. The Mode field specifies an addressing mode and, if appropriate, indicates a source register; assuming that when used, the source register is R1, which has a value of 400. There is also a base register that contains the value of 100. the value of 500 in location 201 may be part of the address calculation. Assume that location 399 contains the value 999, location 400 contains the value 1000, and so on.
Determine the effective address and the operand to be loaded for the following addressing modes:
a. Direct
b. Immediate
c. Indirect
d. Displacement
e. Register
f. Register indirect

6. Assume a stack-oriented processor that includes the stack operations PUSH and POP. Arithmetic operations automatically involve the top one or two stack elements. Begin with an empty stack. Show the stack elements after execution of each instruction.
PUSH 2
PUSH 5
PUSH 4
ADD
PUSH 8
ADD
MUL

0 comments:

Post a Comment

Related Posts with Thumbnails