Blockchain starting with X
in C language, int type can be assigned an integer starting with X
for example,
int a = 0x1;
The beginning of X indicates that the string of numbers is a hexadecimal number. Judging the base of a string of numbers can be done in the following ways:
< UL >binary starts with 0b
octal starts with 0
hexadecimal starts with X
no prefix is decimal
2525968; 25968; 25968; 25968;
2525968; 25968; 数 数 数
2525968888888; 25ff;
but you can also do without ox, such as A33. No ox means that it's also a hexadecimal number, and it's just to let people know it's a hexadecimal number more intuitively.
The prefix of hexadecimal is x, the number zero and the letter X
Hexadecimal (English Name: hexadecimal) is a method of data representation in computer. It's different from the expression in our daily life. It consists of 0-9, A-F, and the letters are case insensitive. The corresponding relationship with 10 is: 0-9 corresponds to 0-9; A-F corresponds to 10-15; The number of n-base can be represented by the number of 0 ~ (n-1), and the letter A-F can be used for the number over 9
extended data:
decimal system, that is, carry counting system, is a counting method with carry defined artificially (there are counting methods without carry, such as the original rope counting method, the "positive" counting method commonly used in ticket singing, and the similar tally mark counting method)
for any kind of system -- X system, it means that the number operation in each position is carried forward every x bit. Decimal is every decimal one, hexadecimal is every hexadecimal into one, binary is every binary into one, and so on, X-ary is every x-carry
first of all, we need to understand that the six letters a, B, C, D, e and F in hexadecimal are no longer English letters, but six symbols with new meanings, representing different orders of magnitude
binary 0,1 can represent all numbers< In decimal system, 0,1,2,3,4,5,6,7,8,9 can be used to represent all numbers
all numbers are represented by 0,1,2,3,4,5,6,7,8,9, a, B, C, D, e and F in hexadecimal
all the bases greater than ten can be represented by 0,1,2,3,4,5,6,7,8,9 for the first ten orders of magnitude, but the latter can only be represented by non Arabic numerals, and the common English letters are applied here
supplement: 0x is the mainstream representation of hexadecimal number, which is used by mainstream programming software such as C and C + +; But it is not the only one. In the field of memory analysis, VB
and other programming software, other representation methods will be used.