100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CS-Register Instruction CA$12.43
Add to cart

Class notes

CS-Register Instruction

 1 view  0 purchase

Register instruction for computer arithmetic

Preview 1 out of 2  pages

  • November 9, 2022
  • 2
  • 2022/2023
  • Class notes
  • -
  • All classes
All documents for this subject (1)
avatar-seller
googlygoof
Arithmetic Machine
code
Addition add $s0, $s1, $s2 $s0 = $s1 + $s2 100000 1
addu $s0, $s1, $s2 $s0 = $s1 + $s2 (always 100001 2
positive)
addi $s0, $s1, 5 $s0 = $s1 + 5 001000 3
addiu $s0, $s1, $s0 = $s1 + 20 (always 001001 4
20; positive)
Subtraction sub $s0, $s1, $s2 $s0 = $s1 - $s2 100010 5
subu $s0, $s1, $s2 $s0 = $s1 - $s2 (always 100011 6
positive)
Multiplication mult $s0, $s1 -$s0 * $s1 -There are two 011000 7
-produces a 64 bits special memory spots
value. Lower 32 bits HIGH and LOW.
are stored in LOW and -mfhi $v0 stores the
upper 32 bits are HIGH value in $v0
stored in HIGH. -mflo $v1 stores the
LOW value in $v1
Multu $s0, $s1 $s0 * $s1 (always 011001 8
positive)
Division div $s0, $s1 -$s0 / $s1 011010 9
-result is stored in LOW
-remainder is stored in
HIGH
divu $s0 / $s1 (always 011011 10
positive)
Logical
And and $s0, $s1, $s2 $s0 = $s1 AND $s2 100100 11
andi $s0, $s1, 25 $s0 = $s1 AND 25 001100 12
OR or $s0, $s1, $s2 $s0 = $s1 OR $s2 100101 13
ori $s0, $s1, 25 $s0 = $s1 OR 25 001101 14
NOR nor $s0, $s1, $s2 $s0 = $s1 NOR $s2 100111 15
XOR xor $s0, $s1, $s2 $s0 = $s1 XOR $s2 100110 16
xori $s0, $s1, 25 $s0 = $s1 XOR 25 001110 17
Shifting
Shift left sllv $s0, $s1, $s2 -shift $s2 number of 000100 18
logical bits to the left of $s1
and store in $s0
sll $s0, $s1, 5 -shift 5 number of bits 000000 19
to the left of $s1 and
store in $s0
Shift right srlv $s0, $s1, $s2 -shift $s2 number of 000110 20
logical bits to the right of $s1
and store in $s0
srl $s0, $s1, 5 -shift 5 number of bits 000010 21
to the right of $s1 and
store in $s0

Page 1 of 2

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 googlygoof. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for CA$12.43. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

56326 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
CA$12.43
  • (0)
Add to cart
Added