Joke Collection Website - Mood Talk - Who can specifically talk about the conversion between binary and decimal?

Who can specifically talk about the conversion between binary and decimal?

Conversion between binary number and decimal number

(1) Binary to Decimal

Expand and sum each binary number by weight. Look at the example:

Put the binary number (101.101) 2 =1* 22+0 * 21+1* 20+/kloc-.

(2) Decimal to binary conversion

Usually, it is necessary to separate the integer part from the decimal part of a decimal number.

Calculation method of integer part: See the example for the method of dividing by two to get the remainder:

The binary value of decimal number (53) 10 is (11kloc-0/0/) 2.

Calculation method of decimal part: the method of rounding off 2, that is, the decimal part is multiplied by 2 every step, and the number to the left of the decimal point (0 or 1) is used as the number in the binary representation, and the integer part obtained by the first multiplication is the highest bit. Look at the example:

Convert (0.5 125) 10 to binary. (0.5 125) 10=(0. 10 1)2