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

  Modifying the database table

A database table comprises of the following columns: employee's name, SS#, job-title, years-in-job, hiring-date, and base-salary.

  Illustrate general network design

Illustrate general network design

  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.

  Write down a css rule

Write down a CSS rule

  Indicating the main factors that influenced policy decision

Hardware maintenance is usually provided by a defined service contract negotiated between the organization purchasing the hardware and the vendor selling the hardware.

  The advantages and disadvantages of using functions

Show how you might write the "case" statement using only the "if" statement in its place an actual case statement. Hint: Nested if statements. Explain your code.

  Chomsky normal form

Requesting assistance with the Theory of Computing.Construct a PDA that accepts L.

  Write down the syntax for a 2d array

Write the syntax for a 2D array which has four rows. The first row would have 10 elements and the second row will have 5 elements. The third row will have 8 elements and the fourth row will have 12 elements.

  How could one improve such protocol

Considering the performance of a communincation protocol design, how may the number of messages have potentially the largerst impact as compared to the total amount of data.

  Examine this aspect of ajax in relation

AJAX would help the trend of pushing software as a service on the Web! Discuss this aspect of AJAX in relation to the Service Oriented Architecture of Web services.

  Add items to the arraylist

Add items to the ArrayList, one at a time, based on user typed input. The user will be prompted for the String to be stored in the ArrayList and then hit enter. The user would be able to continue to add items to the ArrayList until they just hit e..

  Find out coding of binary information and error detection

find out Coding of Binary Information and Error Detection.

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