Is there a way of calculating two hexadecimal value without converting it to int? for example:
String sHex = "f7c0";
String bHex = "040000000";
Hexadecimal values are integers - just represented in hex instead of decimal.
Can't you just do this?
int sHex = 0xf7c0;
int bHex = 0x040000000;
If not, then you actually meant:
String sHex = "f7c0";
String bHex = "040000000";
In which case, the fastest way to do this is still by converting them to integers, using something like Integer.parseInt(sHex, 16);