title: What happens when you bit shift beyond the end of a variable?
body: <p>If you have some variable (on the stack) and you left or right bit shift beyond its end what happens?</p>
  
  <p>i.e.</p>
  
  <pre><code>byte x = 1;
  x &gt;&gt; N;
  </code></pre>
  
  <p>What if x is a pointer to memory cast to a byte and you do the same thing?</p>
  
  <pre><code>byte* x = obtain pointer from somewhere;
  *x = 1;
  *x &gt;&gt; N;
  </code></pre>