title: java - Why is 0x000F stored as unsigned?
body: <p>I was reading through examples trying to understand how to convert signed bytes to unsigned integer counter parts. </p>
  
  <p>The most popular method that I have come across is:</p>
  
  <pre><code>a &amp; 0xFF
  </code></pre>
  
  <p>Where <code>a</code> is the signed byte.</p>
  
  <p><strong>My question</strong> is why is 0xFF stored as unsigned? Are all hex values stored as unsigned? If so why?</p>
  
  <p>And how does "and"-ing turn off the sign bit in the sign integer?</p>
  
  <p>It would be great if someone could break down the process step by step.</p>