Write down the binary representation of the value of pi

Assignment Help Computer Engineering
Reference no: EM131877868

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.

Reference no: EM131877868

Questions Cloud

Discuss and begin to address the many resistances : The restaurant operates as a drive-up only, with parking lots available at most locations for people to sit and eat in their cars.
Why is age hardening critical : Why is age hardening critical? What are the implications if this stage is not completed in the allocated time and how could this be prevented?
Case hardening and nitriding : What are the advantages and disadvantages of case hardening and Nitriding?
What is the current market value : Raphael Corporation's common stock is currently selling on a stock exchange at $85 per share, What is Current market value of this corporation's common stock
Write down the binary representation of the value of pi : Perform the rotation operation on the array. Write down the binary representation of the value of pi assuming the IEEE 754 single precision format.
Name at least one goal that made an impression on you : Based on your area of interest, select one safety goal to review. National Patient Safety Goal review, discuss: What service did you review?
Why would you temper material such as steel : Why would you temper material such as steel? And if not tempered, how does that influence its likely failure, what will happen?
Explain in detail how exceeding the yield point : Explain in detail how exceeding the yield point causes permeant stain, and how that is measured and calculated.
What research would be involved to gather facts : You noticed the materials cost rose significantly for a recent repetitive job as it went through the plant.

Reviews

Write a Review

Computer Engineering Questions & Answers

  How might a systems analyst approach the problem

Since software controls substation operations, how might a systems analyst approach this problem as a systems project? Are there special considerations that a systems analyst needs to think about when dealing with real-time systems?

  Program that creates basic user interface code

Program that creates basic user interface code

  Implement a radix sorting machine

Implement a radix sorting machine. A radix sort for base 10 integers is a mechanical sorting technique that utilizes a collection of bins and one main bin.

  What speed transmission line is necessary

What speed transmission line is necessary to support either type of connection? Show all your work.

  Write a recursive program to compute height of a binary tree

Write a recursive program to compute the height of a binary tree: the longest distance from the root to an external node.

  How much time will it take with pipelining fully explain

alwaysclean is a laundromat that has three operations wash dry and iron. it takes 30 minutes to wash one load 40

  Describe an algorithm for finding the maxima pairs of c

Given a collection C of n cost-performance pairs (c,p), describe an algorithm for finding the maxima pairs of C in O(n logn) time.

  Develop a complete application that uses the scene

Develop a complete application that uses the Scene, Shape affine4, and so on classes and supports reading in and drawing the scene described in an SDL file

  Knowledge of agency level enterprise operating systems

information of advanced Relational Database management Systems (RDMS) operating over a wide-area network. (note: Please explain RDMS operating over a WAN.)

  Description in the last episode of the mafghanistan trilogy

description in the last episode of the mafghanistan trilogy the mamerican forces invaded liberated mafghanistan in

  How are the enterprise software tools

How are enterprise software tools/enterprise resource planning used in helping to decrease the cost of designing and implementing new systems.

  Describe uses for each of intellectual property protection

Give two examples of how a social pressure or need led to the development of a new information technology. Give two examples of how the adoption of a new information technology changed society.

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