Write a version of the following c code segment

Assignment Help Basic Computer Science
Reference no: EM131094020

1)    In tonight's lab you worked with the program Fibonacci.txt. Using this as a guide, implement another array in addition to fibs, and call it "reversefibs."  When you generate the list of Fibonacci numbers, place the numbers in reverse order in reversefibs and print out BOTH the list of Fibonacci numbers AND the reversed list of Fibonacci numbers.

2)   In MIPS assembly, write a version of the following C code segment:

 int A[10], B[10], C[10]

  for (i=1; i < 11; i++) {

    A[i] = i;

    B[i] = A[i] * 2;

     C[i] = A[i] * 4;

  }

At the beginning of this code segment, the only values in registers are the base address of arrays A and B in registers $a1 and $a2. Avoid the use of multiplication instructions-they are unnecessary.Create the arrays in your program and run it in the MARS simulator, and hand in a printout of all arrays, and the source code.

Screenshot of the data is OK, but make sure the font is LARGE ENOUGH to read.

Reference no: EM131094020

Questions Cloud

How does psychology research contribute to health knowledge : How does psychology research contribute to health knowledge and the mind and body relationship? There is a variety of research methods used in psychology. Correlation studies, experimental designs, ex post facto designs, cross-sectional studies an..
Common link state and distance vector routing protocols : Create a 1-page document based on your Week Two Learning Team collaborative discussion,
Discuss the authors interpretation of the result : Describe the research question, including a brief summary of the background for the paper and a hypothesis statement. (If a clearly stated hypothesis is not evident, write and develop one that fits the study purpose.)
Applying the system development life cycle model : Students will gain practical experience applying the System Development Life Cycle model and related techniques by undertaking an individual project based on a real organizational need.
Write a version of the following c code segment : 1)    In tonight's lab you worked with the program Fibonacci.txt. Using this as a guide, implement another array in addition to fibs, and call it "reversefibs."
Major steps from phase : You do not need to use all of the P2 audit steps shown in the Unit III Lesson, but use at least three major steps from each phase (a major step being Step 5 rather than Step 5.1).
Training session on the placement : You have been asked by a local company to conduct a training session on the placement, use, maintenance, and testing of portable fire extinguishers for the company's staff.
Describe and analyze a typical measles outbreak : The purpose of this assignment is to get some experience describing and analyzing a typical measles outbreak. Here is the scenario: You are an epidemiologist with the state immunization program
Find the utility possibility frontier : Economics 711: Final Exam 2005. Consider an economy with two goods and two consumers and one producer. The aggregate endowment vector is (1, 2). The first consumer's utility function is u(x, y) = xy, Find the utility possibility frontier

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determining line cost for three points

Points T1, T2 ,and T3 are 25 miles apart, and points C1 , C2, and C3 also are 25 miles apart. If telephone lines cost $1 per mile, determine the line cost for three?

  What consistency model would be implemented

what consistency model would be implemented?

  Capital life cycle of business development

1. Where does crowdfunding fit in the capital life cycle of business development? 2. Is crowdfunding really all that unique? What does it offer that traditional funding channels and institutions do not?

  Hexadecimal and binary value of the given number

What is its value in hexadecimal if the integer is converted to a 32 bit integer - Find the decimal, hexadecimal and binary value of the given number.

  Create an itt technical institute student project management

You have volunteered to help create an ITT Technical Institute student project management group. You have been asked by the chair of the business school to develop a simple project plan to show the intended activities, to ensure a student group will ..

  Difference between systems analysis and systems design

Illustrate the difference between systems analysis and systems design. What is the goal of each phase? What are the ramifications of finding flaws during the analysis phase or the design phase?

  Design an employee class

Design an Employee class that has fields for the following pieces of information: Employee Name Employee Number Next, design a class named ProductionWorker that extends the Employee class.

  What are the problems with the horizontal and vertical

What are the problems with the ‘‘horizontal'' and ‘‘vertical'' solutions to the handling of multiple relationships as described in the chapter?

  Explain the characteristics of a virtual server

Explain the characteristics of a virtual server infrastructure. Describe the difference between physical server and virtual server environments.Describe the various types of cloud-based architectures: SaaS, IaaS, PaaS.

  Residual error rate for a communication line

A single bit will be in error on a typical public telephone line using 4800 bps modem is 10 to the power -3. If no error detection mechanism is used, the residual error rate for a communication line using 9-bit frames is approximately will be and ..

  Quality management your company has assigned you to work on

your company has assigned you to work on a project plan for a new internal support system. this system will be expected

  Compare and contrast the dyb and gyb strategies

Write clearly and concisely about enterprise architecture topics using proper writing mechanics and technical style conventions.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd