Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that implements the following C instruction in MIPS This should be a relatively simple program for you to write. The intent of

Write a program that implements the following C instruction in MIPS

This should be a relatively simple program for you to write. The intent of this program is to get you familiar with writing MIPS programs and the MARS IDE. For this program I want you to build on the knowledge you learned from the MIPS tutorials, specifically Tutorials 8 and 9. I would like you to write a program that implements the following C instruction in MIPS:

f = g + (h - 5);

You can get as creative as you want but minimally you need to:

Declare the variables f, g and h and set them to the appropriate values.

Implement the math in MIPS.

Final result should be stored if the variable f.

Add comments to your program as you feel necessary. Make sure one of the comments includes your name.

When done please submit the .asm file that you created in MARS to this link. Please take the time to learn MARS, try debugging such as single stepping, monitor the registers, determine how to start and stop a program, review the online help, etc.. Spending this time now will help you during Week 5 where you will create a more complex program.

Lab 2

Scientific Design, Data Collection and Analysis

Objectives:

1. Design your own controlled experiment

2. Collect data

3. Create a graph in excel

4. Analyze results and draw conclusions

Helpful lectures: lecture 1

Today you will be conducting an experiment which will evaluate some aspect of a paper airplane that influences how far it can fly.

Procedure:

Step one: Create two paper airplanes that are identical except for one difference. The difference should be whatever aspect you are interested in seeing how it influences the flight distance. For example, you might want to put a paperclip on the front of one, and not the other. Make a hypothesis about which plane you think will go further. Here is a website that shows different ways to make paper airplanes if you do not know how.

http://www.10paperairplanes.com/

Step two: Design a controlled experiment. You are going to throw these for distance, so you need to make sure that each plane gets exactly the same treatment. How will you throw? How many times will you throw (more is better)? In what order will you throw? Do you throw inside or outside? There might not be perfect answers to all of these (and others that you will come up with), but your main goal is to ensure that the only difference between the two planes is the one item you came up with in step one.

Step three: Conduct the experiment and collect data. Record the distance of each flight (I would do a minimum of ten with each plane). A tape measure is ideal, but you can also measure with just about anything (string, strides, long sticks, etc.). Normally, we would write the distances using the metric system (i.e., meters), but most tape measures will be in feet, so it is okay to use feet or inches for your distance. A normal table to collect your data might look like this:

Throw #

Plane A Distance

Plane B Distance

1

2

3

4

5

6

7

8

9

10

AVERAGE

Step Four: Create a graph of the average distance for each throw. You will do this in excel.

1. Enter your data into a new excel spread sheet. In cell A1 (top left corner) type "Plane A". Don't include the quotes, it's just my way of letting you know everything inside of the quotes is what goes into the cell. In cell B1 type "Plane B". Starting with cell A2 and working down, enter all your distances for plane A, repeat in cell B2 for plane B. If you threw each plane ten times you will end at A11 and B11.

2. Calculate the average distance for each plane. In cell A12 write "=average(A2:A11)". This tells excel to average all of the numbers starting with cell A2 and ending with cell A11. If you did more than ten throws, you'll have to change A11 into whatever cell your data end. Do the same in cell B12 "=average(B2:B11)". If you want to bypass writing the formula for B12 you can always just copy the formula in A12 and paste it into B12. Excel will make the column adjustment (thanks Bill Gates).

3. Now it is time to make the graph. Please watch the video at mms://stream.inverhills.edu/faculty/nhemsta/lab_2.wmv for directions. These videos can take about 10 minutes to load for some people. For others they seem to load almost instantly. I've still not heard a satisfactory explanation for this. If you are having trouble watching the video please see the message at the end of this lab.

You now have both a graph of the average distances, and a data table that you will paste into a word document (see below).

Step Five: Make a conclusion. Based on your data, did you support or reject your hypothesis? Remember, its okay to be wrong. There is nothing wrong with coming up with a hypothesis that turns out to be not true.

What to turn in (in one word document).

1. Your original hypothesis.

2. A brief description of your two planes. Write just enough so I can understand the differences. For example, you might say one plane had a penny taped to the front and the other did not.

3. A paragraph detailing what you did to keep the experiment controlled. This would include such things as how you threw, number of throws, where you threw, etc.

4. Your data table (copied and pasted from excel), and your graph (copied and pasted from excel). You should write a title for your data table that explains what the data actually are (sample table title: individual flight distances (ft) traveled by plane A and plane B).

5. Write two or three paragraphs describing why the experiment turned out the way it did. Start these with stating whether you supported your hypothesis or not. The goal here is to explain how the variable you chose is influencing (or maybe it isn't) the flight distance. For example, if you chose to add some extra paper clips to one plane, don't just say the plane went further because it weighed more. That tells me nothing. Try to figure out why more weight actually matters.

I know you are not all aeronautical engineers, but try. Usually flying further means that you either broke through the air resistance (momentum), or were able to stay on top of the air mass longer. How did your modification accomplish one of these things (or something else)?

Other things to mention here are some problems that you encountered, and also future studies that will expand this research. Don't spend too much time with these last two, focus mainly on the above paragraph.

Please submit the word document to the dropbox folder called Lab 2.

Trouble with video? This is a message we recently received from our tech folks:

If you are using videos off our streaming server this semester remind the students to use the undock button in the content tool to view them.

Mac Users (older version of Flip4Mac needed)

Viewing Camtasia videos with Macs

If students with Macs are trying to view videos off of D2L from our streaming server, they may need to download an OLDER version of Flip4Mac than 2.3.8.1. Here is the website. http://dynamic.telestream.net/downloads/download-flip4macwmv.htm On the left-hand side, you can download older versions. Download 2.3.4.1, which is an older version.

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions