Hexadecimal / decimal chaos

2009 (0x7D9) - The Year of Debugging

Over the time I noticed that some troubleshooting and debugging tools show numbers in hex and some in decimal even for things that are traditionally hex, for example PID and TID. Then when getting data from one program I need to convert it to a different base for another tool. So over some time I was able to get the idea of what hex numbers usually are even if they don’t have hexadecimal ‘A’-'F’ in their digits. For example, in one log I got this output:

Parent changed to 393954

Although this number is valid hex number as well as decimal I had intuitive feeling that it was decimal… Checking source code of the tool revealed that it was output as decimal indeed.

I guess this feeling arouse because I just checked that most window handles that I have seen have the 4th zero digit:

  • Handle: 2801E6
  • Handle: 110044
  • Handle:  10052
  • Handle:  E01B6
  • Handle:  602E2

- Dmitry Vostokov @ DumpAnalysis.org -

Announcements

New Books:

WinDbg: A Reference Poster and Learning Cards

Memory Dump Analysis Anthology, Volume 2

Also available:

Memory Dump Analysis Anthology, Volume 1

New Children's Book:

Baby Turing

Leave a Reply