Questions You are advised to load the MIPS assembly program problem1.asm into your simulator to answer...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Questions You are advised to load the MIPS assembly program problem1.asm into your simulator to answer the following questions. # The program .text 1w move sll add SW $50, value $t1, $50 $50, $80, 2 $50, $80, $t1 $50, result a. Using the Single Step operation, execute each instruction one by one, and record the state of the processor with respect to each instruction. O o Prior to executing each instruction, write down the value of the pc (program counter) for the instruction about to be executed in Table 1. each instruction, write down After executing the value of registers $30 and $t1 for the instruction just executed in Table 1. Instruction 1w $50, value move $t1, $s0 sll $50, $50, 2 add $50, $50, $t1 SW $50, result Table 1 Ans: рс $50 $t1 (3 points) b. Write the mathematical equation of the arithmetic operation for this program performs upon the initial value $50 (For example, $s0 = $s0 + 2). c. If we want to change the arithmetic operation to $s0= ($s0 x 8) - ($s0 + 2), write your new assembly programme in the table below by modifying the code in problem1.asm. Ans: Question 2 The following is a snippet of the assembly program problem2.asm. li $t0, 10 $t4, 0 $s3, N Loop: Σ H. H. li 1w beq addi addi j $s3, $t4, Exit Sto, Sto, 4 $s3, $s3, -1 Loop (3 points) # 'N' is a variable stored in memory Exit: $t0, f_N a. How many times will the loop iterate if i. SW ii. Ans: # 'f_N' is the result i. ii. N is 3? (i.e. how many times will the body of the loop two addi instructions and the j instruction -- be executed if N is 3?)? N is 6? -- the b. This program implements a mathematical function, f(N), that creates a number series. Write the mathematical function f(N) in terms of any value of N. Ans: Question 3 The assembly program problem3.asm execute an arithmetic operation of unknown equation. There are two user input values, M and N, whereby M and N are positive integer fall within a certain range. (2 points) a. State the valid range of M and N. Then, explain in detail how the program tests the validity of the input. Ans: b. Determine the equation of the assembly program. Ans: (4 points) Questions You are advised to load the MIPS assembly program problem1.asm into your simulator to answer the following questions. # The program .text 1w move sll add SW $50, value $t1, $50 $50, $80, 2 $50, $80, $t1 $50, result a. Using the Single Step operation, execute each instruction one by one, and record the state of the processor with respect to each instruction. O o Prior to executing each instruction, write down the value of the pc (program counter) for the instruction about to be executed in Table 1. each instruction, write down After executing the value of registers $30 and $t1 for the instruction just executed in Table 1. Instruction 1w $50, value move $t1, $s0 sll $50, $50, 2 add $50, $50, $t1 SW $50, result Table 1 Ans: рс $50 $t1 (3 points) b. Write the mathematical equation of the arithmetic operation for this program performs upon the initial value $50 (For example, $s0 = $s0 + 2). c. If we want to change the arithmetic operation to $s0= ($s0 x 8) - ($s0 + 2), write your new assembly programme in the table below by modifying the code in problem1.asm. Ans: Question 2 The following is a snippet of the assembly program problem2.asm. li $t0, 10 $t4, 0 $s3, N Loop: Σ H. H. li 1w beq addi addi j $s3, $t4, Exit Sto, Sto, 4 $s3, $s3, -1 Loop (3 points) # 'N' is a variable stored in memory Exit: $t0, f_N a. How many times will the loop iterate if i. SW ii. Ans: # 'f_N' is the result i. ii. N is 3? (i.e. how many times will the body of the loop two addi instructions and the j instruction -- be executed if N is 3?)? N is 6? -- the b. This program implements a mathematical function, f(N), that creates a number series. Write the mathematical function f(N) in terms of any value of N. Ans: Question 3 The assembly program problem3.asm execute an arithmetic operation of unknown equation. There are two user input values, M and N, whereby M and N are positive integer fall within a certain range. (2 points) a. State the valid range of M and N. Then, explain in detail how the program tests the validity of the input. Ans: b. Determine the equation of the assembly program. Ans: (4 points)
Expert Answer:
Answer rating: 100% (QA)
Question1 a Instruction pc s0 t1 lw s0 value 4194304 5 0 move t1 s0 4194312 5 5 sl... View the full answer
Related Book For
Computer Organization and Design The Hardware Software Interface
ISBN: 978-0124077263
5th edition
Authors: David A. Patterson, John L. Hennessy
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
Refer to the situation described in P 192. Assume Pastner measures the fair value of all options on January 1, 2021, to be $4.50 per option using a single weighted-average expected life of the...
-
Would your opinion change if the advertisers were more obvious in their campaignssuch as admitting after each skit that the raving fans were really actors
-
On January 1, 2015, Alpha Manufacturing purchased a machine for $920,000. The company expects the machine to remain useful for eight years and to have a residual value of $70,000. Alpha Manufacturing...
-
There are several exceptions to the hearsay rule. Identify at least three exceptions and give an example of each.
-
Assume that the demand for cosmetic or plastic surgery is price inelastic. Are the following statements true or false? Explain. a. When the price of plastic surgery increases, the number of...
-
Question 4: Following is a simplified form of the fuel-pump loop used in helicopters. Consider the long pipe a series connection of II and CLP. Motor V Compliant Shaft q Pump Short Pipe Accumulator...
-
On July 1, 2013, Owens Corporation places an order with a European supplier for manufacturing equipment for delivery on June 30, 2014. The purchase is denominated in euros in the amount of...
-
lim x-2 (x* - 16) 2 X -
-
The impact of STEM Education on students performance in Kentucky Stakes; Answer the following qestions . Purpose of the Study - Applied Research Questions Study Population Population Justification...
-
Your father loans you 12,000 and his repayment schedule requires 1,317.54 at the end of the year for the next 15 years , what interest rate is he charging?
-
what are ways to improve self-awareness and self management skills ?
-
Discuss the main data-mining methods. Explain the fundamental differences between the data-mining methods.
-
Describe how businesses can guard against becoming participants in money laundering schemes. Include a discussion of at least five red flags that might be seen in a possible money laundering scheme.
-
Cinema Corp. has a stock beta of 1.1 and the market price of its stock is $31. The risk-free rate is 4% and the expected return on the market portfolio is 12%. Find the required rate of return using...
-
An annual report of The Campbell Soup Company reported on its income statement $2.4 million as equity in earnings of affiliates. Journalize the entry that Campbell would have made to record this...
-
What is 5ED4 - 07A4 when these values represent unsigned 16-bit hexadecimal numbers? The result should be written in hexadecimal. Show your work.
-
Assume that registers $s0 and $s1 hold the values 0x80000000 and 0xD0000000, respectively. 1. What is the value of $t0 for the following assembly code? add $t0, $s0, $s1 2. Is the result in $t0 the...
-
Chip multiprocessors (CMPs) have multiple cores and their caches on a single chip. CMP on-chip L2 cache design has interesting trade-off s. Th e following table shows the miss rates and hit latencies...
-
Determine the natural frequency of vibration, in bending, of the system shown in Figs. 2.90 (d) by modeling the system as a single-degree-of-freedom system. Assume that the mass is \(m=50...
-
Describe how the phase angle \(\phi_{0}\) in Eq. (2.23) is to be computed for different combinations of positive and negative values of the initial displacement \(\left(x_{0} ight)\) and the initial...
-
Find the response of the system described in Problem 2.59 using Eq. (2.23). Data From Problem 2.59:- An undamped single-degree-of-freedom system consists of a mass \(5 \mathrm{~kg}\) and a spring of...
Study smarter with the SolutionInn App