Binary codes of the mips instructions for the operations

Assignment Help Computer Engineering
Reference no: EM13896531

Problem 1- MIPS Arithmetics

Perform the following arithmetic operations by giving MIPS code:
1. a = b + c
2. a = b - c + d
3. a = 8 · b
4. a = (2 + b) · 4

Please assume that a is in register $t0, b in register $s0, c is in register $s1 and d is in $s2.. Keep in mind that you do not know the mul operation yet.

Problem 2- Binary codes for instructions

Give binary codes of the MIPS instructions for the operations 1 and 2 of the previous problems.

Problem 3- Memory access in MIPS

Suppose you write the following C code:

B[5] = A[2] + A[3]

1. Please write down the MIPS assembler code for this code. Assume that the address of base of A is stored in $s0, the base of B is stored in $s1.

Problem 4- Memory access using a variable index

Suppose you write the following C code:

B[x] = A[x + 2] + A[x + 3]

1. Please write down the MIPS assembler code for this code. Assume that the address of base of A is stored in $s0, the base of B is stored in $s1 and the value of x in $t0

Problem 5- MIPS Instruction format I (1 point)

The register instruction format for the instruction addi uses 6 bits for the opcode, 5 bits for the first register, 5 bits for the second register. and 16 bits for the constant value that is to be added. A detailed analysis of machine code has revealed that not more than 12 registers are needed for the processor and therefore it has been decided to reduce the number of general purpose registers
to 16.

How and why could the instruction format for the addi instruction be changed?

Reference no: EM13896531

Questions Cloud

Describe the strategic thinking maps for discovering : Describe the strategic thinking maps for discovering advantage
Compute return on total assets for polaris : Key figures for Polaris and Arctic Cat follow.
What is the indifference point between these two processes : What is the indifference point between these two processes? If the company expects to process 3,500 claims per year, which process would you recommend? Why?
A holistic model of nursing : A Holistic Model of Nursing
Binary codes of the mips instructions for the operations : Binary codes for instructions - Give binary codes of the MIPS instructions for the operations 1 and 2 of the previous problems
Calculate the proton speed : A proton traveling at 26.9° with respect to the direction of a magnetic field of strength 3.03 mT experiences a magnetic force of 6.59 × 10-17 N. Calculate the proton's speed.
What is the kinetic energy of the iceboat at the end : An iceboat is at rest on a frictionless frozen lake when a sudden wind exerts a constant force of 200 N, toward the east, on the boat. Due to the angle of the sail, the wind causes the boat to slide in a straight line for a distance of 8.0 m in a ..
Which is a leading manufacturer of offroad and street : Compute common-size percents for KTM using the data provided.
Show that if it angle incident on the first surface : The triangular glass prism with apex angle 60 has an index of refraction 1.5 a)show that if it angle incident on the first surface is 48.6 light will pass symmetrically through the prism.

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