December 1998
CS202: COMPUTER ARCHITECTURE AND DATA COMMUNICATION

QUESTION 1 (Compulsory)

Total Marks: 20 Marks

Click here to access other questions

SUGGESTED SOLUTIONS
Solutions and allocated marks are indicated in green.
Return to Question 1

 

(a) Distinguish between [10]
(i) fetch cycle and execute cycle;
The fetch cycle is used to load the next instruction into the CPU (1 mark). The execute cycle then runs into the instruction (1 mark).

 

(ii) subroutine call and hardware interrupt;
A subroutine call is caused by the current executing program itself and takes place where the programmer desires it (1 mark). A hardware interrupt is initiated by a piece of hardware, and the program suspension is involuntary (1 mark).

 

(iii) immediate addressing and direct addressing;
In immediate addressing, the operand field contains the actual data. No memory reference is required (1 mark). In direct addressing, the operand field contains the effective address of the data. It requires one memory reference (1 mark)

 

(iv) bus topology and ring topology
A bus network uses a common channel. It can either transmit to a specific destination or broadcast (1 mark). A ring network uses a unidirectional data flow. It may be centralised or decentralised (1 mark).

 

(v) clock cycle time and memory cycle time
Clock cycle time is the time to execute one simple CPU instruction: to add together two accumulators, or request a memory lead (1 mark). Memory cycle time is the time it takes to put a memory read (write) request onto the bus and have the value arrive at the CPU (1 mark).

Alternative explanation, if correct, should also receive credit.

 

(b) Name and describe three of the registers used in the fetch-execute cycle. [3]
Award marks for these or other appropriate answers:

PC (Program Counter): contains the address of the next instruction to be fetched (1 mark). MAR (memory address register): contains the address of a location in memory (1 mark). MBR (memory buffer register): contains a word of data to be written to memory or the word most recently read (1 mark). IR (instruction register): holds the instruction currently being held (1 mark).

 

(c) Write a program for a 2-address format assembly language to compute the following expression:

X:=(A - (B / C)) * (D + E)

[4]
One solution is as follows:

DIV B,C
SUB A,B
ADD D,E
MUL A,D
STORE X,A

Award (4 marks) for any program which stores the correct value into X. Deduct (1 mark) for failing to store into X; deduct (1 mark) for each other wrong subexpression - equivalently, for each wrong line, if the program is in the above form.

 

(d) Explain the concept of time divison multiplexing (TDM) [3]
Award marks for these or other relevant points:

TDM uses a single channel to transmit more than one data stream (1 mark), using successive time intervals for different signals (1 mark). The transmission appears to be continuous as the time interval allocated for each data stream is short (1 mark).