What is the corresponding c statement

Assignment Help Computer Engineering
Reference no: EM132217611

1. Assume that registers $s0 and $s1 hold the values 0x80000000 and 0xD0000000, respectively.

a.) What is the value of $t0 for the following assembly code?
add $t0, $s0, $s1

b.) Is the result in $t0 the desired result, or has there been overflow?

c.) For the contents of registers $s0 and $s1 as specified above, what is the value of $t0 for the following assembly code?
sub $t0, $s0, $s1

d.) Is the result in $t0 the desired result, or has there been overflow?

e.) For the contents of registers $s0 and $s1 as specified above, what is the value of $t0 for the following assembly code?

add $t0, $s0, $s1

f.) Is the result in $t0 the desired result, or has there been overflow?

2. For the MIPS assembly instructions below, what is the corresponding C statement?

Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively.

sll $t0, $s0, 2 # $t0 = f * 4

add $t0, $s6, $t0 # $t0 = &A[f]

sll $t1, $s1, 2 # $t1 = g * 4

add $t1, $s7, $t1 # $t1 = &B[g]

lw $s0, 0($t0) # f = A[f]

addi $t2, $t0, 4

lw $t0, 0($t2)

add $t0, $t0, $s0

sw $t0, 0($t1)

Reference no: EM132217611

Questions Cloud

What does the following code do : What would be the value of discountRate after the following statements are executed?
Which css attribute would change an elements font color : Which CSS attribute would change an element's font color to blue?
What is two-factor authentication : Of these three fundamental controls, which two are used by the Domain User Admin to create users and assign rights to resources?
Write a program that reads a sentence as input and converts : Write a program that reads a sentence as input and converts each word to "Pig Latin."
What is the corresponding c statement : For the contents of registers $s0 and $s1 as specified above, what is the value of $t0 for the following assembly code?
Give the associated range of destination host addresses : Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has the following forwarding table.
Create a text based fantasy arena combat game : Build a Fantasy Fighting arena combat game in C++ you will be designing and implementing a store with purchasable goods .
Write some statements that use a while loop to associate s : Associate the sum of the non-negative values in the list numbers with the variable sum .
Write the definition of a class player containing : A constructor that takes two int arguments and assigns the first one to counter and the second one to limit.

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