This has nothing to do with encoding.
The first string shows the value in decimal system (base 10), the second string shows the value in hexadecimal system (base 16, as indicated by the 0x
).
Вопрос
Here's an encoded memory address
9867640
actual hex address (decoded):
0x969178
how is it encoded ? .. I tried ascii but doesn't seem like it
Решение
This has nothing to do with encoding.
The first string shows the value in decimal system (base 10), the second string shows the value in hexadecimal system (base 16, as indicated by the 0x
).
Другие советы
This is not encoding rather representation.
The first one is decimal( BASE 10) representation
9867640
= 9
8
6
7
6
4
0
= 9
x10^6 +8
x10^5 + 6
x10^4 + 7
x10^3 + 6
x10^2 + 4
x10 + 0
x10^0
The second one is Hexadecimal( BASE 16) representation
0x969178
= 9
6
9
1
7
8
= 9
x16^5 +6
x16^4 + 9
x16^3 + 1
x16^2 + 7
x16 + 8
x16^0
Inorder to move from Hexadecimal base to decimal base you just multiply each digit with 16^n,
when n is the "place" of the digit in the number (starting from 0).
0x969178 becomes 8*16^0 + 7*16^1 + 1*16^2 +...