Win a copy of Head First Android this week in the Android forum!
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Tim Cooke
• Campbell Ritchie
• Paul Clapham
• Ron McLeod
• Liutauras Vilda
Sheriffs:
• Jeanne Boyarsky
• Rob Spoor
• Bear Bibeault
Saloon Keepers:
• Jesse Silverman
• Tim Moores
• Stephan van Hulst
• Tim Holloway
• Carey Brown
Bartenders:
• Piet Souris
• Al Hobbs
• salvin francis

# decoding hex values

Greenhorn
Posts: 17
• Number of slices to send:
Optional 'thank-you' note:
Is there any easy method to decode such hex values into decimal values?0x7FFFFFFF

If there is no easy procedure , what is the normal procedure?

Regards,
Yashwanth

Ranch Hand
Posts: 657
• Number of slices to send:
Optional 'thank-you' note:

Originally posted by yashwanth reddy:
Is there any easy method to decode such hex values into decimal values?0x7FFFFFFF

If there is no easy procedure , what is the normal procedure?

Regards,
Yashwanth

(7 * 16^7) + (15 * 16^6) + (15 * 16^5) + (15 * 16^4) + (15 * 16^3) + (15 * 16^2) + (15 * 16^1) + (15 * 16^0)

Or, convert to binary first (then convert to decimal)...

0111 1111 1111 1111 1111 1111 1111 1111

Greenhorn
Posts: 2
• Number of slices to send:
Optional 'thank-you' note:
u can use the method in Integer wrapper class as follows:::

int decvalue= Integer.parseInt(hexVal,16);

Steve Morrow
Ranch Hand
Posts: 657
• Number of slices to send:
Optional 'thank-you' note:

Originally posted by brij tiwari:
u can use the method in Integer wrapper class as follows:::