MIPS instructions Comprehensive Exam Prep Actual Questions And Correct detailed Answers.
6 views 0 purchase
Course
MIPS
Institution
MIPS
ori - correct answer ori $t, $s, imm
bitwise ORs a register ($s) and an immediate value (imm) ---> stores the result in a register ($t)
( loads $t with imm, if $s =$0 )
$t = $s | imm; advance_pc (4);
ex:
ori $8,$0,0x2
#put two's comp. t...
bitwise ORs a register ($s) and an immediate value (imm) ---> stores the result in a register ($t)
( loads $t with imm, if $s =$0 )
$t = $s | imm; advance_pc (4);
ex:
ori $8,$0,0x2
#put two's comp. two into register 8
ori $9,$0,0x3
#put two's comp. three into register 9
bitwise opertation - correct answer operates on one or more bit patterns or
binary numerals at the level of their individual bits, good for comparisons and calculations
bitwise ORs - correct answer compares two bit patterns and performs OR
operation--->results in each position is 0 if both bits are 0, otherwise 1
bne - correct answer bne $s, $t, offset
branch not equal; if $s != $t advance_pc (offset << 2)); else advance_pc (4);
slti - correct answer (signed)
slti $t, $s, imm
, if $s < imm, then $t=1
else if $s > imm, then $t=0
sw - correct answer sw $t, offset($s)
store word; $t is stored in the address $s
-offset is a constant that is added to the register in brackets
MEM[$s + offset] = $t;
lw - correct answer lw $t, offset($s)
word is loaded into a register from the specified address
$t = MEM[$s + offset]
word - correct answer 4 bytes or 32 bits
all instructions are 32 bits or one word
byte - correct answer 8 bites
halfword - correct answer 2 bytes
stack grows - correct answer grows from high memory to low memory
.data - correct answer -declare variable names used in program
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller RealGrades. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.99. You're not tied to anything after your purchase.