[Nine] base base conversion binary conversion

Hexadecimal conversion

 

Binary Decimal turn

Method: decimal modulo 2 addition method, i.e., decimal number 2 addition, and the remainder is the number of weights on the bits, the quotient obtained by continuing addition to 2, so step down operation continues until the quotient is zero so far.

Binary Coded Decimal

Methods are: the right to expand by a binary number, that was adding decimal numbers.

Binary octal

Method: by 3-bit binary number is obtained by adding an expanded right octal number. (Note, 3 Binary Coded Octal is from right to left to start the conversion, make up less than 0:00).

 

Octal converted into binary

Method: octal by modulo 2 addition method to obtain a binary, octal 3 for each binary, insufficient leftmost zeros.

Binary Hex

Method: turn octal and binary approximation method, it is to take the three-octal, hexadecimal is to take Four. (Note, 4-bit binary to hex is transferred from right to left to start the conversion, make up less than 0:00).

Hex binary transfer

Method: hexadecimal number by 2 modulo addition method to obtain a binary number for each hexadecimal four binary, insufficient leftmost zeros.

 

 

Decimal turn octal or hexadecimal There are two ways

First: the indirect method - turn from decimal to binary and then converted into binary octal or hexadecimal. Do not explain the usage of pictures here

Second: direct method - to turn the decimal octal or hexadecimal except in accordance with 8 or 16 more than take until the quotient is zero so far.

Octal or hexadecimal to decimal

Method: the octal, hexadecimal by right start, adding that was a decimal number.

Conversion between octal and hexadecimal There are two ways

The first: the conversion between them can be first converted into binary before conversion.

The second: They can convert between decimal and then turn into the first conversion.

Binary Decimal turn

Method: decimal modulo 2 addition method, i.e., decimal number 2 addition, and the remainder is the number of weights on the bits, the quotient obtained by continuing addition to 2, so step down operation continues until the quotient is zero so far.

Binary Coded Decimal

Methods are: the right to expand by a binary number, that was adding decimal numbers.

Binary octal

Method: by 3-bit binary number is obtained by adding an expanded right octal number. (Note, 3 Binary Coded Octal is from right to left to start the conversion, make up less than 0:00).

 

Octal converted into binary

Method: octal by modulo 2 addition method to obtain a binary, octal 3 for each binary, insufficient leftmost zeros.

Binary Hex

Method: turn octal and binary approximation method, it is to take the three-octal, hexadecimal is to take Four. (Note, 4-bit binary to hex is transferred from right to left to start the conversion, make up less than 0:00).

Hex binary transfer

Method: hexadecimal number by 2 modulo addition method to obtain a binary number for each hexadecimal four binary, insufficient leftmost zeros.

 

 

Decimal turn octal or hexadecimal There are two ways

First: the indirect method - turn from decimal to binary and then converted into binary octal or hexadecimal. Do not explain the usage of pictures here

Second: direct method - to turn the decimal octal or hexadecimal except in accordance with 8 or 16 more than take until the quotient is zero so far.

Octal or hexadecimal to decimal

Method: the octal, hexadecimal by right start, adding that was a decimal number.

Conversion between octal and hexadecimal There are two ways

The first: the conversion between them can be first converted into binary before conversion.

The second: They can convert between decimal and then turn into the first conversion.

Guess you like

Origin www.cnblogs.com/youxiu123/p/11480484.html