• Post Reply Bookmark Topic Watch Topic
  • New Topic
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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

negative hexa to decimal

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had started this post on another thread but I could not find
out how to convert a negative hexa to decimal.
Sorry for posting again but any help is greatly appreciated.
If the hexa was 0xd6 then,
13* (16^1)+6* (16^0)
= 13 * 16 + 6 * 1
= 208 + 6 = 214
i.e, 0xd6 = 214
How to convert 0xffffffd6 to decimal?
Thanks.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
0xffffffd6 is in binary -
1111 1111 1111 1111 1111 1111 1101 0110
in decimal = -1 - (1+8+32) = -42
Cheers,
Dan
 
reply
    Bookmark Topic Watch Topic
  • New Topic