title: Reducing a long to an integer in java via bit shifting
body: <p>My use case is this,</p>
  
  <p>I wish to reduce an extremely long number like <code>97173329791011L</code> to a smaller integer by shifting <code>down</code> and be able to get back the long number <code>97173329791011L</code> from the smaller integer by shifting <code>up</code> .I have implemented a function called <code>reduceLong</code> to implement this as shown below</p>
  
  <pre><code>private int reduceLong(long reduceable) {
          return (int) (reduceable &gt;&gt; 32);
      }
  </code></pre>
  
  <p>However, I feel the function I have is in a way wrong as the result produced is incorrect. Here is the result from my console output when trying to reduce <code>97173329791011L</code> to a smaller integer</p>
  
  <pre><code>Trying to reduce 97173329791011L
  Result= 0
  </code></pre>
  
  <p>Your help would be greatly appreciated. Thanks alot.</p>