I don't know why I always forget the method of base conversion after a period of time
I don't know why
Take a look at this knowledge recently , And think about the principle

Binary to decimal
example ：
Binary number 1001B=1*2^0 + 0*2^1 + 0*2^2  + 1*2^3=1 + 8 =9

principle ：
A decimal number 632 It can be expressed as
=600    + 30     + 2
=6*10^2 + 3*10^1 + 2*10^0
=632
Similarly, a binary number 11011 It can be expressed as
10000+ 1000+  000   + 10    +1
=1*2^4+ 1*2^3+ 0*2^2 + 1*2^1 +1*2^0
=16   + 8    + 0     + 2     +1
=27

Decimal to binary
A=a(2^0)+b(2^1)+c(2^2)+d(2^3)+e(2^4) （ Isn't the following sum the decimal process ）
Now assume that the number is not binary , Divide by base 2 have to
A/2=a(2^0)/2+b(2^1)/2+c(2^2)/2+d(2^3)/2+e(2^4)/2
At this time, due to a(2^0)/2 This formula can't be divisible , And the other terms can certainly be divisible . therefore a(2^0) It has to be left over , that is a It has to be left over
（ because a and a(2^0) Always equal ）, So you can start with the remainder a See the first bit