title: Can someone explain ARM bitwise operations to me?
body: <p><strong>Can someone explain ARM bit-shifts to me like I'm five?</strong> I have a very poor understanding of anything that involves non-decimal number systems so understanding the concepts of bit shifts and bitwise operators is difficult for me. </p>
  
  <p><em>What would each of the following cases do and why (what would end up in <code>R3</code> and what happens on behind the scenes on the bit level)?</em></p>
  
  <pre><code>/** LSL **/
  mov r0, #1
  mov r3, r0, LSL#10
  
  /** LSR **/
  mov r0, #1
  mov r3, r0, LSR#10
  
  /** ORR **/
  mov r0, #1
  mov r1, #4
  orr r3, r1, r0
  
  /** AND **/
  mov r0, #1
  mov r1, #4
  and r3, r1, r0
  
  /** BIC **/
  mov r0, #1
  mov r1, #4
  bic r3, r1, r0
  </code></pre>
  
  <p><strong>PS.</strong> Do not explain it in terms of C bitwise operators. I don't know what they do either (the <code>&gt;&gt;</code>, <code>&lt;&lt;</code>, <code>|</code>, <code>&amp;</code> ones). </p>