Quote:

The amount of happiness that you have depends on the amount of freedom you have in your heart

Wednesday, 14 March 2012

CS501-Advance Computer Architecture


Assignment No. 1 SOLUTION
SEMESTER SPRING 2011
CS501-Advance Computer Architecture
Total Marks: 20
Due Date: 18/04/2011
Instructions
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:
o        The assignment is submitted after due date.
o        The submitted assignment does not open or file corrupt.
o        The assignment is copied.
o        There is not mentioned the student Id in the assignment or
           name of file is other than student ID
GOOD LUCK

Question No: 1
                                                                  Marks: 4+4+4+4=16

·         Consider the following equation

Z= (a-b)-16(c+d)

You have to solve this equation using the following


·         Three Address instruction

·         Two Address instruction

·         1 Address Instruction

·         0 Address Instruction
Solution:
3 address instruction
2 address instruction
1 address instruction
0 address instruction
                                   
Sub x,a,b
Add r,c,d
Mul s,r,16
Sub z,x,s

                     

Load y,a
Sub y,b
Load s,c
Add s,d
Mul s,16
Sub y,s
Store z,y


Lda c
Adda d
Mula 16
Sta s
Lda a
Suba b
Suba s
Sta z


push c
push d
add
push 16
mul
push a
push b
sub
sub
popz






Question No: 2
                                                                  Marks: 2+ 2= 4

·                     A digital computer has a common bus system for 16 registers of 32 bit each. The bus is constructed with multiplexers. Then answer the following questions

·                     How many selection inputs are there in each multiplexer?
16 registers = 24 => 4 selection inputs
·                     What sizes of multiplexers are needed?
16 registers => 16 x 1 line multiplexers are needed





No comments:

Post a Comment

“You can't change the past, but you can ruin the present by worrying about the future”