二进制数、八进制数、十进制数、十六进制数相互转换方法(Binary
number, octal number, decimal number, hexadecimal number
interconversion method)
Th base in the rest of the number, the remainder when single digits for the first time, the second remainder when ten digits, and so on for the rest, until the dividend is less than the weight, the final dividend when the supreme digits.
One, decimal to binary
Convert 55 to binary
2 | 55
27-1 bits
13~1 second
6~1 the third
3~0 fourth
1-1 fifth
The final divisor is the seventh, which is 110111
Second, decimal to octal
For example: 5621 to octal
8 | 5621
702 一 5 (ones)
87 ——six second
10 ——seven third
1 ——2 fourth
The final number: 127658
Three, decimal number hexadecimal
For example: 76521 to hexadecimal
16 | 76521
4726 -- 5 first (ones)
295 一 6 second
18 — 6, 3
一 2 fourth
The last 1276516
The relationship between binary and hexadecimal
2. The system is 0000 0001 0001 0011 0011 0101 0110 0111
16 goes into 0, 1, 2, 3, 4, 5, 6, 7
enter 1000 1001 1010 1011 1101 1101 1111 16 in system 8 9a (10) b (11) c (12) d (13) e (14) f (15) You can use a four-digit binary number to represent a hexadecimal system, such as 3A16 to binary:
3 is 0011, A is 1010, and the combination is 00111010. We can get rid of the left 0, which is 1110102
Right, we' re going to turn binary into 16,
You simply divide the digits of the binary from the right to the lef
二进制数、八进制数、十进制数、十六进制数相互转换方法(Binary 来自淘豆网m.daumloan.com转载请标明出处.