title: Why is the last value wrong?
body: <p>Here is my methods :
  Fl_IN = 1114599018 and k = 0</p>
  
  <pre><code>public void int FL(int FL_IN, int k) {
      int d0, d1;
      d0 = FL_IN &gt;&gt; 16;
      d1 = FL_IN &amp; 0xffff;
      if (k % 2 == 0) {
          d1 = d1 ^ (d0 &amp; EK[k / 2]);
          d0 = d0 ^ (d1 | EK[(k / 2 + 6) % 8 + 8]);
      } else {
          d1 = d1 ^ (d0 &amp; EK[((k - 1) / 2 + 2) % 8 + 8]);
          d0 = d0 ^ (d1 | EK[((k - 1) / 2 + 4) % 8]);
      }
      System.out.println(Integer.toBinaryString(d0));
      System.out.println(Integer.toBinaryString(d1));
      System.out.println(Integer.toBinaryString(d0 &lt;&lt; 16));
      System.out.println(Integer.toBinaryString((d0 &lt;&lt; 16) | d1));
      System.out.println((d0 &lt;&lt; 16) | d1);
  }
  </code></pre>
  
  <p>And here is the output :</p>
  
  <pre><code>1110110010101000
  10111001000110
  11101100101010000000000000000000
  11101100101010000010111001000110
  -324522426
  </code></pre>
  
  <p>I don't understand why it is  saying that 11101100101010000010111001000110 = -324522426 it should be 3970444870</p>
  
  <p>EDIT : Using long instead of int resolved the problem</p>