The mips architecture reserves register

Assignment Help Computer Engineering
Reference no: EM13168151

The MIPS architecture reserves register 0 (called $zero) to be always equal to 0. This allows synthesizing additional addressing modes and additional instructions from the instruction set.
The 'load' instruction in MIPS that transfers data from the memory to a register supports only the 'base
with displacement' addressing mode. This is the format of the 'lw' (load word) instruction:
lw <reg>, <imm>(<reg>)

An example is: lw t0, 12(s0)

the data in the memory at address (s0+12) is copied into register t0.

Part a) Show how the addressing mode above can be used as the 'direct addressing' mode.

Part b) Show how the addressing mode above can be used as the 'register indirect addressing' mode.

Part c) Show how the register $zero can be used to synthesize a 'mov' instruction from the 'add'
instruction. The 'mov' instruction copies one register into another. The 'mov' instruction will then be a
pseudoinstruction. (Syntax: mov <reg>, <reg> add <reg>, <reg>, <reg>)

Part d) Show how the register $zero can be used to synthesize a 'li' (load immediate) instruction from the
'addi' (add immediate) instruction. The 'li' instruction loads an immediate number in a register. (Syntax:
li <reg>, <constant> addi <reg>, <reg>, <constant>)

Part e) In your opinion, do the uses above justify reserving a register to be always equal to zero?

Reference no: EM13168151

Questions Cloud

Evaluate a user''s expression : Write a function that will evaluate a user's expression. It should call the getExpression function that you previously wrote to get the expression to evaluate from the user. You should evaluate the expression step-by-step.
Calculate the celsius equivalent of a fahrenheit temperature : Construct a program that allows you to calculate the Celsius equivalent of a Fahrenheit temperature.
Create an application in which a user can enter a phone book : Create an application in which a user can enter a phone book entry, including the following elements: First Name, Last Name, Phone Number, email address
The contenders are tortoise and hare : The contenders are Tortoise and Hare, and they begin race as investors at "tile 1" of 70 tiles The finish line is at 70 the tile. With each tick of the clock
The mips architecture reserves register : The MIPS architecture reserves register 0 (called $zero) to be always equal to 0. This allows synthesizing additional addressing modes and additional instructions from the instruction set.
Calculates the position of a cannonball : Write a c++ program that calculates the position of a cannonball that is fired straight up in the air. Use short time intervals (.01 seconds) and display the position and velocity every second.
Indicate the changes : Indicate the changes (using the shorthand representation) that you would need to make to the original Premiere Products database design to support the following requirements. There is no relationship between customers and sales reps.  When a custo..
You can push multiple operands on the stack : You can push multiple operands on the stack. The operation will always use the two topmost values. For example, to evaluate (A+B+C), you can use the code below:
Pattern matching : Question 1 In sed, when you do pattern matching, the largest pattern is always matched first, left to right.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Selecting a life-cycle model for project

She wishes your organization to build a product which will monitor the company’s stock, starting with purchasing of leather and keeping track of boots as they are manufactured, distributed to individual stores, and sold to customers.

  Explain the frame format of a typical ethernet packet

Explain how carrier sense multiple access with collision detection (CSMA/CD) works.

  Create graph the demand data for yardarts

how to create Graph the demand data for YarDarts.

  Briefly describe the concept of queues

Briefly describe the concept of queues.

  Give a description of the current system

The board has asked whether a new system should include a web presence for their constituents, but they are not familiar with the pros and cons and need your help on the part of a proposed solution.

  Tracking down people to obtain people

A city government wants to track down the people who run the small businesses and do not pay the city’s $125 business-license fee.

  Disadvantages are there to dereferencing of pointer

What drawbacks are there in implicit dereferencing of pointers, but only in certain contexts? For example, consider the implicit dereference of a pointer to a record in Ada when it is used to reference a record field.

  Make functionwill add one to each element in array of size

Write down the following C++ routines using pointers only. Do not use any [] 's in your code.

  How to evaluates an expression using this technique

Many early calculators used a post-fix entry to perform arithmetic calculations. For in case 2 + 3 in in-fix notation would be 2 3 + in post-fix notation. ( 2 + 3 ) * 4, would be 2 3 + 4 *. Utilizing a stack, post-fix expressions are very easily e..

  A robot has a position and a method

A robot has a position and a method void move (Maze m) thatmodifies the position. Provide a common superclass Robot whose move method does nothing

  Drawbacks of using a web authoring application

Compare the advantages and disadvantages of using the Web authoring application, an HTML editor and a text editor for developing websites.

  Developing the circuitry for class project

If number is divisable by 4 or 5, number has to be a multiple of 2 in order to generate an output. If the number is devisable by 3, it has to be a multiple of 3 and 5 to generate an output.

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