title: What exactly does the lb instruction do?
body: <p>I have an exam coming up, and one of the practice problems was:</p>
  
  <blockquote>
    <p>Assume that <code>$t0</code> contains the value <code>0x12121212</code> and <code>$t1</code> contains
    the address <code>0x1000000</code>.</p>
    
    <p>Assume that the memory data, starting from address <code>0x1000000</code> is:
    <code>88 77 66 55</code>.</p>
    
    <p>What will be the value of <code>$t0</code> after the following code is executed:</p>
  
  <pre><code>lb $t0, 0($t1)
  </code></pre>
    
    <p>a) <code>0x00000088</code> b) <code>0x88121212</code> c) <code>0xffffff88</code> d) <code>0x12121288</code></p>
  </blockquote>
  
  <p>The answer I gave was <code>a</code>, because the byte that the <code>lb</code> instruction will read (by my understanding of what the instruction does) is 88. The 88 will then be stored in <code>$t0</code>, thus the value will be <code>0x00000088</code>. But the answer given was <code>c</code>. I feel like I have a fundamental misunderstanding about how <code>lb</code> works - can someone please explain why the answer is <code>c</code>?</p>