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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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