Casting signed integer constant in Java
<p>Simple question, I have some customised java that allows to have 32 bit HW variables.
I would like to asign such a variable a constant 32-bit value, however, this command fails
in the following scenario:</p>

<pre><code>HWINTVar a = const.var(toHWint(32), 0xf1234567);
</code></pre>

<p>but works in this scenario:</p>

<pre><code>HWINTVar a = const.var(toHWint(32), 0x11234567);
</code></pre>

<p>The error message in the first case is that a critical number of bits can be lost in constant values, and the reason for this is that the constants that I am passing to this method are signed. Is there a simple way how I can tell in Java to interpret this constant value as unsigned values? I tried:</p>

<pre><code> HWINTVar a = const.var(toHWint(32), (unsigned int) 0xf1234567);
 HWINTVar a = const.var(toHWint(32), (unsigned integer) 0xf1234567);
</code></pre>

<p>but this obvioulsy cant work in Java as it does not support unsigned data types. Any idea how this could be done?</p>

<p>Cheers!</p>
