I need to figure out, how to set the hexa number 0xffff, which is used for bitwise AND in code below dynamically.
int offsetData = address & 0xffff;
For example I need something like this:
int offsetData = address & myHexaValue;
I have a decimal int value, which I need to put in hexadecimal format instead of myHexaValue.
This is my state now.
int decimalShift = 16*8;
String myHexaValueString = Integer.toHexString(decimalShift);
Now.. can I convert my String hexa number to int hexa number so I could put result into myHexaValue?
int myHexaValue = 0xffff;?