hexadecimal value
return jjMoveStringLiteralDfa1_0(0x140L, 0x4000000000000L);
i try to convert 开发者_运维百科0x4000000000000L
hexa to binary and text but i get strange characters. Is this hexadecimal value?
0x4000000000000
is a hex number, the L at the end is telling you that it's a long
integer (in this case, I'm guessing an 8 byte int).
The 0x
prefix is standard to several languages. It denotes the start of a hexadecimal number. The L
suffix denotes a long value in several languages (e.g. C).
If you regroup it it's easier to see its value:
4 0000 0000 0000
which is equivalent to:
0004 0000 0000 0000
Each group is two bytes, so the total length is eight bytes.
The two most significant bytes (the ones on the left) are 00
and 04
which is 0000 0000 0000 0100
in binary. In other words, the value has only the 51st bit set (it's counted from the right, the so called least-significant bit), all other bits are cleared. Looks like a bit mask (a flag). For completeness, here's the binary representation:
0000 0000 0000 0100 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Each space delimited group is a nibble (a half-byte), each four groups equal two bytes.
So the number is a perfectly legal 64bit value. But maybe you confuse the value with representing a character ? Because it certainly doesn't, it's waaaay outside the Unicode range (which goes up to 0x10FFF IIRC).
BTW, the number converted to decimal is 1.125.899.906.842.620, all of which a decent calculator should be able to show you (the Apple calculator in Mac OS X does a good job when set to programmer mode, for example).
精彩评论