April 2000
CS202 : COMPUTER ARCHITECTURE AND DATA COMMUNICATIONS

QUESTION 5

Total Marks: 15 Marks

Click here to access other questions

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

(a)In most processor designs,the format of a typical instruction comprises of an opcode and an operand.The operand is also known as an address field .
Explain in detail the purpose and content of the address .eld.[6 marks ]
Award up to (6)for points from the following,or other valid points.
Operations specified by computer instructions are executed on some data stored in memory or in processor registers (1).
Operands residing in memory are specified by their addresses (1).Thus an n-bit address field will correspond to an n-line address bus (1)(unless other arrangements are made),and permit access to a memory containing up to 2^n words (1).
Operands residing in processor registers are specified by a register address (1).A register address is a binary code of n-bits that specifies one of 2^n registers in the processor (1).
Thus a computer with 16 processor registers R0 throug to R15 will have in its
instruction code a register address field of four bits.The binary code 0101,for example, will designate register R5 (1).
Computers may have instructions of several different lengths containing varying
number of addresses (1).The number of address fields in the instruction format of a computer depends upon the internal organisation of its registers (1).

(b)Most instructions fall in one of three types of organisation.Explain in detail each of these different types of instruction formats:
In each case,award marks for the indicated points,or other relevant comments.
(i)Single accumulator organisation.[2 marks ]
An accumulator type organisation is the simplest of computer organisations.All
operations are performed with the implied accumulator register (1).The
instruction format in this type of computer uses one memory address field (1).

(ii)Multiple register organisation.[2 marks ]
A processor unit with multiple registers usually allows for greater programming
flexibility.The instruction format in this type of computer needs three registers (1). Thus,the instruction for arithmetic addition may be written in symbolic form as ADD R1,R2,R3 (1).
(iii)Stack organisation.[2 marks ]
Computers with stack organisation have instructions that require one address field for transferring data to and from the stack (1).Operation type instructions such as ADD do not need an address field because the operation is performed directly with the operands in the stack (1).

(c)Given below is an equivalent register transfer statement for each instruction in a 3-address format.From the statements below work out the corresponding program and hence or otherwise,write down the expression which is calculated.
R 1 M [A] +M [B]
R 2 M [C] +M [D]
M [X] R 1 *R 2
[3 marks ]
ADD A,B,R 1
ADD C,D,R 2
MUL R 1 ,R 2 ,X
(2)for an entirely correct program (no alternatives allowed);or (1)if there is only one mistake.
The program in symbolic form evaluates X =(A +B )*(C +D )
(1)if this is stated precisely.