php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
S501 Advance Computer Architecture Assignments No. 2 Solutions Fall 2014
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#2
Follow this example for Question No. 2
z = 4(a +b) – 16(c+58) page 57 and 58 handouts
Solution A:
Notice that the
SRC does not have a multiply instruction.
multiplication with powers of 2 can be achieved by repeated shift left operations.
ld R1, c ; c is 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 ; the result is in R9
st R9, z ; store the result in memory location z
Assuming Multiply instruction
ld R1, c ; c is 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 ; the result is in R9
st R9, z ; store the result in memory location z

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Messages In This Thread
S501 Advance Computer Architecture Assignments No. 2 Solutions Fall 2014 - by Vuhelper - 12-10-2014, 05:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  VU Fall 2026 Assignments: How to Write Solutions That Get Full Marks (Complete Guide) admin 0 29 11-03-2026, 05:22 PM
Last Post: admin
  Bus Ticket Reservation System SRS CS619 Final Software Project Semester Fall 2014 Vuhelper 6 5,270 01-13-2015, 04:46 AM
Last Post: Xpert
  CS710 Mobile and Pervasive Computing Assignment No. 2 Fall 2014 Vuhelper 0 2,678 12-23-2014, 02:41 PM
Last Post: Vuhelper
  MTH301 - Calculus II Assignment No. 02 Solution and Discussion Fall 2014 Vuhelper 0 2,855 12-17-2014, 09:34 PM
Last Post: Vuhelper
  CS601 Assignment No. 2 Close Date is 15th December 2014 Vuhelper 3 3,741 12-15-2014, 09:53 PM
Last Post: Vuhelper
  ENG201 Business & Technical English Assignment No. 02 Due Date Dec 15, 2014 education-2014 2 3,381 12-15-2014, 08:30 PM
Last Post: Vuhelper
  IT430 - E-Commerce Assignments No. 2 Solution and Discussion Close Date Dec 15, 2014 Entboy 2 2,880 12-15-2014, 04:29 PM
Last Post: Vuhelper
  STA406 Assignment Solution Fall 2014 (Total Marks15) 15th December 2014 Vuhelper 0 2,317 12-15-2014, 04:25 PM
Last Post: Vuhelper
  ENG301 Business Communication Assignment No. 02 Due Date Dec 15, 2014 education-2014 2 2,318 12-15-2014, 04:18 PM
Last Post: Vuhelper
  CS601 Data Communication Solution and Discussion Due Date: 18/11/2014 education-2014 3 2,353 12-15-2014, 03:05 PM
Last Post: Breaking-news

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support