title: Work a Bitwise operation backwards
body: <p>I need to know how to do this backwards so that it will work for all of the options. If I start with shift i can get radix so How would i get shift from starting with radix.</p>
  
  <pre><code>int shift = 4; //3 will give octal base 4 will give Hex base 1 will give binary base
  int radix = 1 &lt;&lt; shift; // this comes out as 16
  </code></pre>
  
  <p>So Like i said above how would i get this to go the otherway</p>
  
  <pre><code>int radix = 16;
  int shift =(some operation);
  </code></pre>
  
  <p>Also to make this work for if radix is 8, 2 or 16</p>