举例
原理
- 整数都可以表示为以2为底的幂组成的多项式(二进制)
- 整数对2取余,得到二进制下的个位数a0
- 用商对2取余,得到二进制下的十位数a1
Z = a n 2 n + a n − 1 2 n − 1 + … + a 2 2 2 + a 1 2 1 + a 0 2 0 = 2 × [ a n 2 n − 1 + a n − 1 2 n − 2 + … + a 2 2 1 + a 1 ] + a 0 = 2 × [ 2 × ( a n 2 n − 2 + a n − 1 2 n − 3 + … + a 2 ) + a 1 ] + a 0 \begin{aligned} Z &= a_{n}2^{n} + a_{n - 1}2^{n - 1} + \ldots + a_{2}2^{2} + a_{1}2^{1} + a_{0}2^{0} \\&= 2 \times {\color{Blue} \left\lbrack {a_{n}2^{n - 1} + a_{n - 1}2^{n - 2} + \ldots + a_{2}2^{1} + a_{1}} \right\rbrack} + {\color{Purple} a_{0}} \\&= 2 \times \left\lbrack {2 \times {\color{Blue} \left( {a_{n}2^{n - 2} + a_{n - 1}2^{n - 3} + \ldots + a_{2}} \right)} + {\color{Purple} a_{1}}} \right] + {\color{Purple} a_{0}} \end{aligned} Z=an2n+an−12n−1+…+a222+a121+a020=2×[an2n−1+an−12n−2+…+a221+a1]+a0=2×[2×(an2n−2+an−12n−3+…+a2)+a1]+a0