title: Using bitwise operation to multiply by 3
body: <p>Very basic question that is tripping me up:
  Write a function that produces the same thing as this:</p>
  
  <pre><code>int mult_3_div_4(int x){return (x*3)/4;}
  </code></pre>
  
  <p>But only using ! ~ &amp; + &lt;&lt; >> bitwise operators</p>
  
  <p>Divide by 4 is of course &lt;&lt; 2
  So I tried something like:</p>
  
  <p><code>int test(int x) {return ((x&lt;&lt;1 + x) &gt;&gt; 2);}</code></p>
  
  <p>But I can't seem to find anything that matches x*3 using bitwise operators</p>