Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Computer Organization and Design Assignment: MIPS Assembly Programming and Computer Arithmetic

Q1 Write and test an adding machine program that repeatedly reads in integers and adds them into a running sum. The program should stop when it gets an input that is -1, printing out the sum at that point.

Q2 Write and test a program that reads in a positive integer using the SPIM system calls. If the integer is not positive, the program should terminate with the message "Invalid Entry"; otherwise the program should print out the names of the digits of the integers, delimited by exactly one space. For example, if the user entered "728," the output would be "Seven Two Eight."

Q3 Write and test a MIPS assembly language program to compute and print the first 150 prime numbers. A number n is prime if no numbers except 1 and n divide it evenly. You should implement two routines:

- test_prime (n) Return 1 if n is prime and 0 if n is not prime.
- main () Iterate over the integers, testing if each is prime. Print the first 150 numbers that are prime. Test your programs by running them on SPIM.

Q4 A left rotation operation on an array of size shifts each of the array's elements unit to the left. For example, if left rotations are performed on array [1, 2, 3, 4, 5], then the array would become [3, 4, 5, 1, 2].

Given an array of n integers and a number, d, perform d left rotations on the array.

- Write a function to read two integers n, d.
- Read the following n integers into an array.
- Perform the rotation operation on the array.
- Then print the updated array as a single line of space-separated integers.

Q5 Answer the following:

a. What decimal number does the bit pattern 0×0C000000 represent if it is a two's complement integer? An unsigned integer?
b. If the bit pattern 0×0C000000 is placed into the Instruction Register, what MIPS instruction will be executed?
c. What decimal number does the bit pattern 0×0C000000 represent if it is a floating point number? Use the IEEE 754 standard.

Q6 Answer the following

a. Write down the binary representation of the value of pi assuming the IEEE 754 single precision format.
b. Write down the binary representation of the value of pi assuming the IEEE 754 double precision format.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92706217

Have any Question?


Related Questions in Computer Engineering

Question do you support the development and implementation

Question : Do you support the development and implementation of biometric optical surveillance system (BOSS) as a crowd surveillance tool for police departments? The response must be typed, single spaced, must be in time ...

Be as specific as you can for the following questions

Be as specific as you can for the following questions, explain each concept in detail and how you arrive at your solutions. This is JUST as important as your actual answers. You are provided a unit square domain where th ...

Starting out with cpp 8th edition pg 449 7 with

Starting out with Cpp 8th edition Pg 449 #7 WITH MODIFICATIONS! Write a program that asks the user for a file name, and then ask the user for up to 100 input values. Write the user input values to the file. Then read the ...

Question suppose you are considering an improvement to a

Question : Suppose you are considering an improvement to a computer program. The improvement is applicable only to a fraction 35% of the program and the speedup of the improved fraction is 15. What is the overall speedup ...

One of the basic motivations behind the minimum spanning

One of the basic motivations behind the Minimum Spanning Tree Problem is the goal of designing a spanning network for a set of nodes with minimum total cost. Here we explore another type of objective: designing a spannin ...

Doolittle co is expected to pay a dividend of 23 next year

Doolittle Co. is expected to pay a dividend of $2.3 next year. Doolittle is expected to pay 20% of its earnings as dividends and will have an ROE of 9% until the fourth year. After that, its ROE is expected to decrease t ...

Each of the following lists has an average of 50 for which

Each of the following lists has an average of 50. For which one is the spread of the numbers around the average biggest?smallest? a. 0, 20, 40, 50, 60, 80, 100 b. 0, 48, 49, 50, 51, 52, 100 c. 0, 1, 2, 50, 98, 99, 100 Gu ...

The inflation rate is 20 per year the real rate of return

The inflation rate is 2.0% per year. The real rate of return is 2.5% per year. A perpetuity that paid $100 this year will provide income that grows by the inflation rate. What is the value of the perpetuity?

Question suppose that you were creating a new global

Question : Suppose that you were creating a new global organization. The new organization will provide Information Technology (IT) infrastructure consulting services, computer security consulting services, and cloud comp ...

Quality management plan it should includea short statement

Quality Management Plan. It should include: A short statement that reflects your team's philosophy or objective for ensuring that you deliver a quality system to your client. Develop and describe the following that your ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As