title: Convert 32 bit binary number to decimal
body: <p>someone who can help me I have the following drawback,
    to enter a negative decimal binary in this case enter -20 (11000001101000000000000000000000) throws me the following error:</p>
  
  <p>Exception in thread "main" java.lang.NumberFormatException: For input string: "11000001101000000000000000000000"</p>
  
  <pre><code># Include  &lt;stdio.h&gt; 
  # include  &lt;stdlib.h&gt;
  
  public static void main(String[] args) {       
      int bits = Integer.parseInt("1000001101000000000000… 2);        
      float f1 = Float.intBitsToFloat(bits);
      int Sign = ((bits &gt;&gt; 31) == 0) ? 1 : -1;
      int Exponent = ((bits &gt;&gt; 23) &amp; 0xff);
      int Mantissa = (Exponent== 0)
      ? (bits &amp; 0x7fffff) &lt;&lt; 1
      : (bits &amp; 0x7fffff) | 0x800000;
      System.out.println("Sign: " + Sign + " Exponent: " + Exponent + "Mantissa:" + Mantissa);
      System.out.println(f1);
  }
  </code></pre>