-
Do you know how to do the math?If I don't understand, I can't help it.
-
There are two ways to convert between octal and hexadecimal:
First, the conversion between them can be converted to binary and then to each other.
Second: the conversion between can be converted to decimal first and then to each other.
For example, if you 053977 a hexadecimal number, convert it to binary 001 010 011 100 101 110 111, and then convert the binary to octal, you will get an octal number of 1234567.
Hexadecimal is the more commonly used programming languageBecause two hexadecimal digits specify exactly one byte. On some platforms, the power of 2, the size of the word, and the instructions are easier to understand. The modern ubiquitous x86 architecture also falls into this category, but octals rarely use this architecture, although the binary encoding of the opcode for certain properties becomes more obvious, when displayed in octal, such as modrm bytes, which are divided into and 3 bits, so octal can be used to describe these encodings.
The above content reference: Encyclopedia - octal.
-
Method: Use decimal numbers and divide them by n (the type of base that needs to be converted, e.g. binary n=2, octal n=8, hexadecimal n=16) until the quotient is 0, and then take the remainder from bottom to top.
For example: 18 (decimal) to binary.
For example: 18 (decimal) to octal.
For example: 18 (decimal) to hexadecimal.
Method: Multiply each digit by n (binary n=2, octal n=8, hexadecimal n=16) to the power a, the value of a starts at 0, increments by 1 each time, and then add all the numbers together.
For example: binary 10010 to decimal.
For example, octal 22 is converted to decimal.
For example: hexadecimal 12 to decimal.
Method: Binary numbers are grouped every three digits, if there are less than three digits, 0 is automatically added, and then all decimal numbers are converted into decimal numbers in turn, and then all decimal numbers are grouped together from left to right.
For example, binary 10010 is converted to octal.
Octal to binary only needs to be reversed, converting every octal number into a three-digit binary number.
Method: Binary numbers are grouped with four digits, if there are less than four digits, 0 is automatically added, and then converted into decimal numbers in turn, and then all decimal numbers are grouped together from left to right.
For example, binary 10010 is converted to hexadecimal.
Hexadecimal to binary is simply the other way around, converting every digit in hexadecimal to a four-digit binary number.
Method: You can convert the numbers to binary first and then convert them accordingly.
-
1.Conversion between binary and octal.
Since 8 = 2 2 2, i.e. 8 = 23. It can be seen that a one-digit octal number is equivalent to a three-digit binary number.
1) Convert binary numbers to octal numbers.
To convert a binary number to an octal number, just calculate the corresponding octal number for every three digits from right to left (if there are less than three digits, add "0" in front to make up the three digits).
(2) Convert octal numbers to binary numbers.
To convert an octal number to a binary number, simply replace each octal number with the corresponding three-digit binary number.
When converting an octal number to a binary number, the "0" in the highest digit of the binary number can often be removed.
2 Conversion between binary and hexadecimal.
Since 16 = 2 2 2 2, i.e. 16 = 24. Therefore, a one-digit hexadecimal number is equivalent to a 4-digit binary number.
1) Convert binary numbers to hexadecimal numbers.
The way to convert a binary number to a hexadecimal number is to calculate the corresponding hexadecimal number by adding "0" to every four digits from right to left (if there are less than four digits, add "0" in front of it to make up the four digits).
(2) Convert hexadecimal numbers to binary numbers.
To convert a hexadecimal number to a binary number, simply replace each hexadecimal number with the corresponding four-digit binary number.
When converting a hexadecimal number to a binary number, the "0" in the highest digit of the binary number can often be removed.
It should be noted that it represents a number, and if it is a decimal number, it is not necessary to specify the effect.
Second, eight, and hexadecimal numbers, they should be explained by subscripts or letters.
-
The conversion between 2 8 10 16 is as follows:
There is a formula: the digits of binary, octal, and hexadecimal numbers are each given to the power (n-1) of their respective bases, and the sum of their respective decimal numbers is the corresponding decimal number. single digit, n=1;Ten digits, n = 2.
For example: 110b = 1*2 to the power of 2 to the power of 1*2 to the power of 1 * 2 to the power of 0 * 2 to the power of 0 + 4 + 2 + 0 = 6d.
110q = 1*8 to the 2nd power 1*8 to the 1st power 0*8 to the 0th power 64+8+0=72d.
110h=1*16 to the 2nd power, 1*16 argument to the 1st power, 0*16 to the 0th power, 256+16+0=272d.
Hexadecimal is the more commonly used programming language
Because two hexadecimal digits specify exactly one byte. The power of 2 on some platforms, the size of the word and the instructions are easier to understand. The modern ubiquitous x86 architecture also falls into this category, but octals rarely use this architecture, although the binary encoding of the opcode for certain properties becomes more obvious, when displayed in octal, such as modrm bytes, which are divided into and 3 bits, so octal can be used to describe these encodings.
-
Usually used are decimal numbers, converted into octal numbers, divide the decimal number by 8, get the remainder written in the last digit, and then use the quotient to continue to divide by 8, get the remainder to write the penultimate digit, continue to divide by 8 ,...until it is not divided enough, write to the first place. Decimal numbers are converted to binary, and hexadecimal numbers are converted to 2 and 16 respectively.
To convert an octal number to a decimal number, multiply the first digit by 8 plus the second digit, and then multiply by 8 plus the third digit...until the last digit is added.
Binary, hexadecimal numbers are converted to decimal numbers in the same way, and the multipliers can be replaced with 2 and 16 respectively.
How much is an octal number converted to a hexadecimal number.
1.Binary 1000 is replaced by 16.
With the 8421 conversion method, that is, from left to right, 8*1+4*0+2*0+1*0=0x8, this is the universal conversion method for all hexadecimal to binary, bit-to-bit alignment conversion, multiply by 8421 respectively, and then add up. If the binary number. >>>More
Binary numbers. Writing is long, error-prone, and hard to remember, while the decimal system. >>>More
If it's a method, I can give you a natural language description of how the decimal integer part n can be converted to binary as follows: >>>More
Binary. In the 18th century, Leibniz, a German master of mathematical philosophy, read the composition structure of Bagua from the Latin translation of the Book of Changes sent to him by his missionary friend Bowitt, and was surprised to find that its basic prime number (0) (1), that is, the yin and yang lines of the Book of Changes, its carry system is binary, and he believes that this is the most advanced mathematical base system in the world. >>>More