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

  Describe the development of network architectures

explain the development of network architectures and its subsequent consolidation over past 20 years. Include topologies and the TCP/IP, Internetwork Packet Exchange/Sequence Packet Exchange (IPX/SPX), Network Basic Input Output System (NetBIOS), ..

  What technologies must be used to secure those areas

The employees have hopes of making the breakthrough and bringing the company public in next two years. You have been hired as a security consultant to assess the company's needs.

  Prepare a program which manages a registry of compact discs

make a program that manages a registry of compact discs cds. the register may e.g. based on a doubly linked list

  Risk assessment of ict system

Risk Assessment of ICT System and Developing Computer Incident Response System on WAMP platform

  Which of the statements is not correct

When creating a table, which of the subsequent statements is NOT correct?

  Build a read-write property named validlastname

Create a read-write property named ValidLastName that stores a String value in the hidden variable mstrLastName. design the property using a Property Procedure.

  Using a lock guarantees that deadlock cannot occur

Once a Lock has been obtained by a thread, the Lock object will not allow another thread to obtain lock until the first thread releases it.

  Questionfor this module you will require to complete

questionfor this module you will require to complete following tasks. this section will be additional to the end of

  Write down the decimal equivalents for ieee floating point

Add the unsigned binary numbers then express the answer in decimal.

  In order to provide a convenient self-service solution for

in order to provide a convenient self-service solution for students to access personal and course-related material

  Advantages of technologies

List some of the advantages of some of current technologies explained in our reading this week involving VoIP, Virtual Private Networks, Unified Communications, Wi-Fi and wireless technologies such as RFID.

  Development of hardware or software products

The article begins with the following statement: "Often a piece of hardware or software will come with a license agreement that states that the creator is not liable for any damages that may result from the use of their product.

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