title: Why do integers in Java integer not use all the 32 or 64 bits?
body: <p>I was looking into 32-bit and 64-bit. I noticed that the range of integer values that can stored in 32 bits is <code>±4,294,967,295</code> but the Java <code>int</code> is also 32-bit (If I am not mistaken) and it stores values up to <code>±2 147 483 648</code>. Same thing for <code>long</code>, it stores values from <code>0 to ±2^63</code> but 64-bit stores <code>±2^64</code> values. How come these values are different?</p>