Test program using three different cases

Assignment Help Basic Computer Science
Reference no: EM131441524

Problem 1: Write a MIPS program (which must be named as "hw4_prob1.s") that will read in a base (as an integer) and a value (nonnegative integer but as an ASCII string) in that base and print out the decimal value; you must implement a function (which accepts a base and an address for a string as parameters, and returns the value) and call the function from the main program. The base will be given in decimal and will be between 2 and 36, and the digits for the values will be in set [0...9, a...z]. You can assume that no overflow will occur and the value is valid in the given base. An example run will be:

Enter a base (between 2 and 36 in decimal): 2

Enter a number in base 2: 101

The value in decimal is: 5

Then you need to test program using three different cases (you must use three different bases) and include the results in the pdf file you need to submit.

Hint: The input and output can be done using syscalls in MIPS that are given on p. A-44 (Appendix A).

Reference no: EM131441524

Questions Cloud

Create an array of people first names : Create an array of people's first names. Using a loop, read the names from a text (txt) file, and store each one into the array. The array should allow for a maximum of 100 entries. Continue to read in first names and store them into the array. Th..
What is the boiling point of freshwater : To help you understand the oceanic world, you'll need to explore water's unique and usual physical properties and link to its chemical properties. There is a computer on the Captain's desk. You'll need to use it to figure out what's in your water...
Express total inventory as weeks of supply : Jack? Jones, the materials manager at Precision? Enterprises, is beginning to look for ways to reduce inventories. A recent accounting statement shows that the inventory investment for raw materials is $3,370,700?, for? work-in-process is $6,530,000?..
Identify your research paper topic : Identify your Research Paper topic and due date and receive GRST instructor approval. he body of your research paper must be at least eight pages with at least eight scholarly sources. A discussion board post is not a research paper, a group paper ..
Test program using three different cases : Write a MIPS program (which must be named as "hw4_prob1.s") that will read in a base (as an integer) and a value (nonnegative integer but as an ASCII string) in that base and print out the decimal value; you must implement a function
Different diagnostic tools presented in textbook : Compare and contrast two different diagnostic tools presented in the textbook that you believe would work well to manage change in your industry or organization. Why are these the best tools for your industry or organization?
What are possible solutions to remedy your chosen impact : Anthropogenically induced Climate Change or Global Warming endured many years of controversy before gaining widespread public acceptance despite the accumulation of substantial data and developing theories.What evidence or data do you think is the..
The work-in-process inventory level computed : Consider a Component X, one unit of which is used in every 5th Stapler (e.g., X could be a cartridge used to hold the staples). The average lead-time (= wait time in queue + production time) for one container of Component X is one week. Estimate the ..
Drawbacks of video evidence : Video is normally pretty solid evidence, but what are some of the drawbacks of video evidence that, as a prosecutor, you should be aware of?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Draw an er diagram

a. Draw an ER diagram. Make sure each entity type has at least one key attribute. Document any assumptions you make. Avoid diagrams with a single entity. b. If you think the description is incomplete, list other data the database should store. c. Adj..

  Creating a database design in visio

Suppose a local college has tasked you to develop a database that will keep track of students and the courses that they have taken. In addition to tracking the students and courses, the client wants the database to keep track of the instructors te..

  What is the expected number of floors the elevator stops

A building has n floors numbered 1, 2, . . . , n, plus a ground floor G.

  Who is impacted by cultural competency or the lack thereof

Why is this an important topic? Who is impacted by cultural competency or the lack thereof? Discuss how this topic relates to your studies and how you might apply these ideas in the workplace.

  Why visualization technologies are becoming an important

Determine the main reasons why visualization technologies are becoming an important part of organizational success. Select two (2) such technologies related to information systems and analyze the manner in which the utilization of the selected tec..

  Propose an idea to control and prevent the erosion

Propose an idea to control and prevent the erosion, and to save your seaside home from falling into the ocean. Try to think of an idea that will be feasible to actually carry out, and post your idea to the discussion board.

  What is the size of a char and a string

What are the sizes in memory of other data types in C++? I mean, I know that a double is 8 bytes and an int is 4 bytes. What is the size of a Char and a String?

  Design of glass electrodes

Why is shielding vital in the design of glass electrodes that have an internal resistance of 10^6 ohms or more?

  Create a user with the following attributes

In the Protocols window, HTTP and HTTPS are already selected. Click Add, expand All Protocols, select FTP, and click Add. Click Close, and click Next.

  Evaluate e x for a given value of x

Show all steps of the developing expansion on separate rows. Also, evaluate e x using the built-in exponential function.

  Ideas you learnt on interpretation

Input: The input to the program shall be a text file containing binary encoding of some x86 code. Here is a sample input file ("sampleinput.txt"): 8d 4c 24 04 83 e4 f0 50 c1 f8 02 34 2e 89 e5 45 83 ec 04 80 7c 24 04 81 5d This is for the following..

  Programme should be able to edit books entry

Programme should have minimum of 3 functions (parameters passing demonstration) Programme should be able to add new books entry (name, ISBN ,author etc). Programme should be able to edit books entry. Programme should be able to issue the books.

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