title: Binary representation in Java
body: <p>I am finding it difficult to understand and work with this binary representation in java:</p>
  
  <p>With the help of the user Jon Skeet, I understood that binary representation should be built this way.</p>
  
  <p>Here's a code sample:</p>
  
  <pre><code>public class chack {
  
  public static void main(String[] args) {
      int num2=2;
      int num3=3;
      int num4=4;
      int num1=1;
      int nirbinary = (num1 &lt;&lt; 24) | (num2 &lt;&lt; 16) | (num3 &lt;&lt; 8) | num4;
      System.out.println(nirbinary);
      String nir=  Integer.toBinaryString(nirbinary);
      System.out.println(nir);
      }
  }
  </code></pre>
  
  <p>Couple of question:</p>
  
  <ol>
  <li>How does one get num1 (for example) back from an int who is already in this binary</li>
  <li>why do I get <code>16909060</code> when I print <code>nirbinary</code>- what does it stands for?
  How does one get num1 (for example) back from an int who is already in this binary 
  representation?</li>
  </ol>
  
  <p>Thank you</p>