In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Addition and subtraction conversion method (I think there are more things to remember)
The basis (premise) of number system conversion is to understand the concepts of binary, decimal, and hexadecimal. To put it simply, it is per cardinality (2, 10, 10, 16)
Carry. First of all, we need to know that the binary number of 1111 is 0-1111 (B), so the corresponding binary number cannot exceed 8 digits in the range of 0-255.
Here is a picture to demonstrate the calculation process.
two。 Conversion method of multiplication and subtraction (less memorized)
We know that hexadecimal and binary can be converted to each other, and the corresponding relationship is that one bit of hexadecimal corresponds to four bits of binary, such as the decimal number 255.
Its binary number: 1111 1111 (B); its hexadecimal number is: FF (exact should be 0xFF)
Therefore, if you are mainly familiar with the binary of 0255and the operation values of 16 and smaller integers, you can quickly calculate the corresponding values.
Binary, the process is to convert decimal to "fake hexadecimal" (no more than two digits), and then to binary.
Continue to follow the above example: the decimal number 219 (skillfully remembering is the multiplication of more than 10 to remember the tail value, simply memorize it)
20813 * 16 the remainder is 11. The combination is 13 and 11, and then the conversion to binary is 1101 1011 (B).
3. Near large value conversion method (similar to the first method, but requires familiarity with position weight)
First of all, we have to understand the meaning of "near large value" here. This is a concept given by me, which is actually within the range of 0,255.
The black number-1 in the first method, that is:
255,127,63,31,15,7,3,1
Continue to follow the example of 219 above, which is close to 255,255 binary number is 1111 1111 (B), and the difference between the two is-36 (320.4).
Then the bit weight of the binary number of 255is set to the cardinality of 5 and 2, and the result is 1101 1011 (B).
To take another example, 115,127 (0111 1111 (B)) is near, and the difference between them is-12 (8 / 4).
If the binary digital weight is set to the cardinality of 3 and 2, the result is 0111 0011 (B).
In fact, by comparing method 1 with method 3, we can find that if the difference between the decimal number and the adjacent large value is too large, then use method 1, and vice versa.
The premise is to understand what the position right is. But if you are familiar with the binary numbers 192, 224240248252254255, then
Faster conversion of the number system can be carried out.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.