It depends on how exactly the values need to be converted to a long. I suppose the idea in the code that you show is correct: the first value in the array is the most significant byte, and the last value is the least significant byte.
You have to make sure that the shift operations are being done on long values; right now, they are done on int values. You could make the 0xFF a long literal by appending "L", for example:
My problem is i have a register 0f size 32bit and it giveing 8 digit HEX value and i want to convert that HEX to Integer base 10 and also i have to take care of -ve values also; [ May 12, 2008: Message edited by: Pavithra Papi ]