We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

# CS501 Advance Computer Architecture, Assignment # 2, Due Date 9 December 2014

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Views: 10364

Attachments:

### Replies to This Discussion

this file is correptted kindly post it again zaini

Thnks

kindly ayesha bta dain pr ksy likhna ha

halo anybody share the solution with us if anyone have

zaini don,t be smart stop spamming virus infected files. Admin where are you he is posting backdoor virus using keylogers etc .. he posted virus server using fake name of assignments file no one here is save block him and banned him from this site.    No one click on links that zaini posted other wise your pc will be hacked.

suna hai qayamat waly din koi kisi ka na ho ga...par idher ning pe to abi sy ye haal hai,,,,,

ha ha ha na bhai asi bhi koi bat nah :-p

0plzzzzzz ........... d0st0000nnn ...........helpppppp

ENJOY.

Attachments:

CHECK IT IF I AM WRONG!

Solution 1:

 Jpl r5, [20] PC←PC+20 Mul r3, r2, r1 R[0]©R[3]←R[2]*R[1] Div r5, r2, 6 R[5] ←R[0] © R[2]/6,R[0] ←R[0] © R[2]%6 Load r4, [r3 +9] R[4] ← M[R[3]+9] Shr r6, r3, 2 R[0] © R[6] ←R[3]+R[2]

Solution 2:

Multiplication with powers of two can be achieved by repeated shift left operations:

ld R1, c                                    ; we take “c” as a label used for a memory location

addi R3, R1, 58                       ; “R3” contains (c + 58)

shl R7, R3, 4                            ; “R7” contains 16(c + 58)

ld R4, a

ld R5, b

add R6, R4, R5                        ; “R6 contains (a + b)

shl R8, R6, 2                            ; “R8” contains 4(a + b)

sub R9, R7, R8                        ; we store the result in “R9”

st R9, z                                     ; now, we store the result in memory location “z”

Suppose, we multiply instructions:

ld R1, c                                    ; we take “c” as a label used for a memory location

addi R3, R1, 58                       ; R3 contains (c + 58)

mul R7, R3, 4                           : R7 contains 16(c + 58)

ld R4, a

ld R5, b

add R6, R4, R5                        ; R6 contains (a + b)

mul R8, R6, 2                           ; R8 contains 4(a + b)

sub R9, R7, R8                        ; we store the result in “R9”

st R9, z                                     ; now, we store the result in memory location of “z”

eeeeeeeeee  lecture no 9th kyoon opcode ke sath likhi hui hain app sub ki ghalt honi upper se sub ne div / wali ke sath  % wali laghai hui  comma, se seprate bi unhon ne ki hui pagal ho sai baat

ayesha agar ap ko pata hai tu sub ko guide karo

## Latest Activity

+!!! Walker'\$ Inception!!! liked Mani Siddiqui BS VIII's discussion مّخمصّہ
52 minutes ago
53 minutes ago
55 minutes ago
55 minutes ago
58 minutes ago
59 minutes ago
+!!! Walker'\$ Inception!!! liked ARhum's discussion Pyaray Baba.....!!!!***
1 hour ago
1 hour ago

1

2

3

## HELP SUPPORT

This is a member-supported website. Your contribution is greatly appreciated!