Computer Organization I, 2 ov, separate exam 17.8.2004
Write in each answer sheet: your name and signature,
id-number, course
name, and page nr/total nr of pages
There are 60 points available from the exam.
Please try to keep your answers relatively short.
- [15 p] Execution of machine instructions.
- [3 p] How is the machine instruction "ADD R5,
T(R1)" represented in the memory?
- [6 p] What happens on the processor during the execution of
the instruction "ADD R5,
T(R1)" during different phases of the cycle?
- [3 p] Define the term interrupt. What
are the different kinds of interrupts? How are the interrupts handled on
the processor?
- [3 p] What interrupts can happen during the execution of the instruction
"ADD R5, T(R1)" ?
- [15 p] Integer representation and the error-correction.
- [2 p] What is the binary representation of integer 47?
- [4p] What is a sign-magnitude representation? What are the
disadvantages of this representation?
- [4 p] What intergers are represented by binary values 00010101 and
10001010, when you use
- sign-magnitude representation
- twos complement representation
- [5p] let us assume, that we want to store 8 data bits
11000010 and to protect it against errors using Hamming code.
- [2 p] How many extra (parity) bits are needed? Where are they
located and what are their values? Please give the full binary sequence
with the parity bits.
- [3 p] How can the Hamming code correct an error
where the data bits have changed to 11001010 and none of the parity bits
have changed?
- [15 p] Define the following terms
- [3 p] process control block
- [3 p] linking
- [3 p] supervisor state
- [3 p] symbolic table
- [3 p] Java virtual machine (JVM)
- [15p] TTK-91: Subroutines.
- [2 p] Define in TKK symbolic language the variables Weight and
Height so that the initial value of Height will be 150 and the initial
value of Weight 55.
- [6 p] Write a procedure Increment (X,A), which adds the
value of A to the value of X and stores this new value to X. Please
follow the guidelines given at the course about the parameter passing.
The parameter X is a reference parameter and A is a value parameter.
- [5 p] Give the sequence of TKK-91 assembly language instructions,
which increments the value of Weight by 20 using the procedure
Increment. Print this new value of Weight. Then increment the value of
Height by the value of Weight using the same procedure.
- [2 p] Please, draw the stack of activation records (or stack
frames) before the procedure call and after the call during the
procedure execution.
TTK-91 assembly language instructions are: NOP, STORE, LOAD, IN, OUT, ADD, SUB, MUL,
DIV,
MOD, AND, OR, XOR, SHL, SHR, NOT, COMP, JUMP, JNEG, JZER, JPOS, JNNEG, JNZER,
JNPOS,
JLES, JEQU, JGRE, JNLES, JNEQU, JNGRE, CALL, EXIT, PUSH, POP, PUSHR,
POPR, SVC, IRET