Find value of digit in an integer (defined in hex)
<p>I have an integer defined in hex, like:</p>

<pre><code>int number = 0x000500000;
</code></pre>

<p>Is it possible to get the value of a digit? For example, I want to know the value of the 5th digit (reading from right to left, though either direction would work great for me). Something like:</p>

<pre><code>public int valueOfDigit(int value, int position) {
    return value at position'th digit of value;
}
</code></pre>

<p>How can I do that? (Not sure if digit is the right term here, please correct me if wrong),</p>

<p>Thanks</p>
