title: How to do a simple binary left shift operation and binary to int conversion?
body: <blockquote>
    <p><strong><code>&lt;&lt;</code></strong>  &nbsp;<strong><em>Binary Left Shift Operator.</em></strong> 
    The left operands value is moved left by the number <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of bits specified by the right operand.</p>
  </blockquote>
  
  <p><em>Binary numbers:</em></p>
  
  <ul>
  <li>1 <em>is</em> 0001</li>
  <li>2 <em>is</em> 0010</li>
  <li>3 <em>is</em> 0011</li>
  </ul>
  
  <p><em>This is my understanding of how Binary left <code>&lt;&lt;</code> works:</em></p>
  
  <ul>
  <li><code>3 &lt;&lt; 1</code> == <code>6</code> <em>and</em> (<code>6</code> == 0110) so since <code>3</code> <em>is</em> 0011 and <code>1</code> <em>is</em> 0001 what exactly is being "shifted" left? Is the second part of the equation just telling it how many zero's to shift left by? So <code>3 &lt;&lt; 1</code> == <code>6</code> just means shift the binary of <code>3</code> left by <code>1</code> zero? Or <code>2 &lt;&lt; 3</code> == <code>16</code> just means shift the binary of <code>2</code> left by <code>3</code> zeros? 
  <br></li>
  </ul>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li>Is my understanding of binary left shift operator correct?</li>
  <li>I can convert an <code>int</code> to binary using: <code>"%04b" % int</code>, but how do I go from binary to int?</li>
  </ol>