Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with MIPS Assembly question Question 1 int fib(int n) { int a = 0; int b = 1; int c = a + b;

Help with MIPS Assembly question

Question 1

int fib(int n) {

int a = 0; int b = 1; int c = a + b;

while (n > 1) {

c = a + b; a = b; b = c; n--;

}

return c;

}

Data Flow Programs

Draw the data flow graph for the fib(n) function . You may use the following data flow nodes in your graph:

+ (addition)

> (left operand is greater than right operand)

Copy (copy the value on the input to both outputs)

BR (branch, with the semantics discussed in class, label the True and False outputs) You can use constant inputs (e.g., 1) that feed into the nodes. Clearly label all the nodes, program inputs, and program outputs. Try to the use fewest number of data flow nodes possible.

Question 2:

Performance Metrics

If a given program runs on a processor with a higher frequency, does it imply that the processor always executes more instructions per second (compared to a processor with a lower frequency)? (Use less than 10 words.)

If a processor executes more of a given programs instructions per second, does it imply that the processor always finishes the program faster (compared to a processor that executes fewer instructions per second)? (Use less than 10 words.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. Identify and choose outcomes to evaluate a training program.

Answered: 1 week ago

Question

6. Conduct a cost-benefit analysis for a training program.

Answered: 1 week ago