0x is hexadecimal (base 16). Without the 0x you get decimal (base 10). This syntax has nothing to do with it being a mov instruction.
The 0x is just a notation to let you know the number is in hexadecimal form. Same as you'd write 042 for an octal number, or 42 for a decimal one.
0x means the number is probably hexadecimal. This applies in C/C++, and probalby other languages.
Literals that start with 0x
are hexadecimal integers. (base 16)
The number 0x6400
is 25600
.
6 * 16^3 + 4 * 16^2 = 25600
For an example including letters (also used in hexadecimal notation where A = 10, B = 11 ... F = 15)
The number 0x6BF0
is 27632
.
6 * 16^3 + 11 * 16^2 + 15 * 16^1 = 27632
24576 + 2816 + 240 = 27632
In C and languages based on the C syntax, the prefix 0x
means hexadecimal (base 16).
Thus, 0x400 = 4×(162) + 0×(161) + 0×(160) = 4×((24)2) = 22 × 28 = 210 = 1024, or one binary K.
And so 0x6400 = 0x4000 + 0x2400 = 0x19×0x400 = 25K
It's a hexadecimal number.
0x6400 translates to 4*16^2 + 6*16^3 = 25600
The numbers starting with 0x
are hexadecimal (base 16).0x6400
represents 25600
.
To convert,
The factors 1, 16, 256, etc. are the increasing powers of 16.
0x6400 = (0*1) + (0*16^1) + (4*16^2) + (6*16^3) = 25600
or
0x6400 = (0*1) + (0*16) + (4*256) + (6*4096) = 25600
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With