title: Store certain bits from one register into certain bits of another register
body: <p>I am trying to learn computer organization in order to be prepared for an upcoming semester and I stumbled across this problem. The problem asks to store bits 5 to 10 from register $1 into bits 10 to 15 of register $2 without changing $1 and remaining bits of $2. Note: It also says that bit numbering is little endian.</p>
  
  <p>So here is what I did.</p>
  
  <pre><code>sll $3, $1, 22    
  slr $3, $3, 27
  sll $3, $3, 10    # after last 3 steps $3 should have desired bits from $1 in bits 10 to 
                    # 15, and the rest of its bits should be 0`s.
  or $2, $2, $3  
  </code></pre>
  
  <p>Now my question is, does the endianness affect the code that I came up with ? Is this code correct for what the problem asks for ?</p>
  
  <p>Small remark, I forgot to set the bits 10 to 15 of register 2 to 0`s before I or it, but I know that it is neccecery.</p>