十六进制的算法(国外英文资料).docVIP

  • 13
  • 0
  • 约2.13万字
  • 约 25页
  • 2017-06-10 发布于河南
  • 举报
十六进制的算法(国外英文资料)

十六进制的算法(国外英文资料) Is A representation method of data in computer. Daily in decimal notation is different with us. It is composed of 0-9, A - F,. And the corresponding relation of decimal is: 0-9 corresponding 0-9; A - F corresponding 10-15; The number of Ns is going to be equal to 0 minus N minus 1, which is more than 9 in the letter A minus F Such as: The decimal system of 32 is the hexadecimal system: 20 Hexadecimal 32 represented as decimal is: 3 x 16 ^ 1 + 2 x 16 ^ 0 = 50 Why is octal and hexadecimal required? In programming, we often use a decimal system... After all, C/C + + is a high-level language. Such as: Int a = 100, b = 99; However, because the data is represented in the computer, in the end, in binary form, sometimes binary can be used to solve the problem more visually. But the binary is too long. For example, the int type occupies 4 bytes, 32 bits. For example, 100, the binary representation of type int will be: 0000 0000 0000 0000 0110 0000 No one would like to think or operate in the face of such a long number. Therefore, C C + + does not provide a way to write binary Numbers directly in code. You can solve this problem by using 16 or 8. Because the larger the system, the shorter the number of expressions. But why should it be 16 or 8, and not others, such as 9 or 20? 2, 8, 16, thats 2 to the 1 to the third power, to the fourth power. This allows the three types of systems to convert very directly to one another. The system of 8 or 16 reduces the binary number, but keeps the expression of the binary number. You can find this in the next section on conversion. The Numbers of 6.2, 8, and hexadecimal Numbers are converted to decimal Numbers The 6.2.1 binary is converted to decimal number The power of the binary number 0 is 2 to the 0, the first digit is 2 to the 1... So, we have a binary number: 0110 0100, which is converted into a decimal system: Here are the vertical: 0110 0100 is converted into decimal 0 0 * 2 ^ 0 = 0 The first bit 0 * 2 ^ 1 = 0 2nd 1

文档评论(0)

1亿VIP精品文档

相关文档