title: Number of bits used in long - java
body: <p>I want to know the number of bits really used in the long datatype in Java. 
  For instance:</p>
  
  <pre><code>long time = System.currentTimeMillis();
  System.out.println(java.lang.Long.toHexString(time));
  </code></pre>
  
  <p>Output:<br>
      12c95165393</p>
  
  <p>Here you can see it only has 11 hex digits which means only 44 bits out of 64 are utilized. 10 bits are still un-utilized. Is there a way to know at runtime how many bits are used OR to pad the remaining bits ?</p>