title: Inverse Calculation
body: <p>i want get <strong>t</strong> from encoded byte</p>
  
  <p><strong>Encode Code</strong></p>
  
  <pre><code>byte enc(int t, int k)
  {
      k %= 8;
      return (byte)(((t &lt;&lt; k) | (t &gt;&gt; (8 - k))) &amp; 0xff);
  }
  </code></pre>
  
  <p><strong>Tried</strong></p>
  
  <pre><code>(65132 &amp; 0xff) | ~0xff
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <pre><code>-148
  </code></pre>
  
  <p><strong>Want</strong></p>
  
  <pre><code>int dec(byte enc, int k)
      return t; // how to calculate t?
  </code></pre>