title: Arithmetic right shift examples in my textbook shift in ones when the MSB was zero
body: <p>I am currently studying assembly, and with it the workings of bitwise operations amongst them shifting. Specifically arithmetic rightshifting is bothering me. </p>
  
  <p>Now, in the book i am reading there are several practice problems, amongst them, I need to perform this operation on a byte consisting of:</p>
  
  <pre><code>0100 0100
  </code></pre>
  
  <p>Now, seeing as the arithmetic rightshift fills in the value of the most significant bit, it seems to me this should be right shited like so:</p>
  
  <pre><code>00001000
  </code></pre>
  
  <p>However, the book states that it should be</p>
  
  <pre><code>11101000
  </code></pre>
  
  <p>That is, 1's are filled in from the left instead of 0's. But wasn't the most significant bit a 0?</p>
  
  <p>well, there's another as well:</p>
  
  <pre><code>0110 0100 &gt;&gt; 3 = 0000 1100
  </code></pre>
  
  <p>But, apparently that's wrong as well, and it should be:</p>
  
  <pre><code>11101100
  </code></pre>
  
  <p>Again, I don't get it the most significan't bit value is clearly 0, the one the furthest to the left, yet the solution tells me 1's should be filled in?</p>
  
  <hr>
  
  <p>so i have a final one here that apparently is correct:</p>
  
  <pre><code>0111 0010 &gt;&gt; 3 = 0000 1110
  </code></pre>
  
  <p>This is what I would expect. So why aren't these others correct?</p>
  
  <p>Reading assembly is incredibly hard without understanding this, since a lot of multiplication and division is compiled to shift operations.</p>