Mips assembly language equivalents , Computer Engineering

MIPS' native assembly code only has two branch instructions, beq and bne, and only one comparison instruction, slt. Using just these three instructions (along with the ori instruction to set a to 0 or 1), write (by hand) the MIPS assembly language equivalents for the following

"C" code snippets, assuming that a is stored in register $4, and b is stored in register $5. Remember that in "C", if an expression is true, it evaluates to 1 and if false, it evaluates to 0.

a) a = (a < b);

b) a = (a > b);

c) a = (a == b);

d) a = (a != b);

e) a = (a <= b);

f) a = (a >= b);

 

Posted Date: 3/1/2013 12:52:32 AM | Location : United States







Related Discussions:- Mips assembly language equivalents , Assignment Help, Ask Question on Mips assembly language equivalents , Get Answer, Expert's Help, Mips assembly language equivalents Discussions

Write discussion on Mips assembly language equivalents
Your posts are moderated
Related Questions
A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

What is to be defined for a push button fields in the screen attributes? A function code has to be described in the screen attributes for the push buttons in a screen.

Explain E-mail gateways. Email using SMTP works better while both the sender and the receiver are on the Internet and can support TCP connections among sender and receiver. Tho

What are the advantages of a Smart Card? Advantages of Smart Card as given below: a. This provides convenience and assists for multiple currencies over borders. b. Us

Q. Instruction set for IA - 64 architecture? Instruction set: Architecture gives instructions for multimedia operations as well as floating point operations. Itanium supports

How will you prepare problem statement? Problem statement should state what is to be completed and not how it is to be executed. It should be a statement of requirements not a

Q. What is Ordered directive? This directive is used in combination with for and parallel for directives to cause an iteration to be executed in order that it would have been h

As IPV6 contain multiple headers, how does it know where particular header ends and next item begins? Several headers types contain fixed size. For illustration a base header h

Q. What is radium utilized for? Answer:- Radium was previously used in self-luminous paints for nuclear panels, watches, clocks, aircraft switches and instrument dials. In

Explain the following the address instruction?  Three-address instruction-it can be represented as add a,b,c Two-address instruction-it can be shown as Add a,b