Example 2-26 Suppose there are weights of 1, 2, 4, 8, 16, 32 grams, each one piece. What weights can be measured? How many different ways are there for each?
$$
\begin{aligned}
G & =(1+x)\left(1+x^{2}\right)\left(1+x^{4}\right)\left(1+x^{8}\right)\left(1+x^{16}\right)\left(1+x^{32}\right) \\
& =\frac{1-x^{2}}{1-x} \cdot \frac{1-x^{4}}{1-x^{2}} \cdot \frac{1-x^{8}}{1-x^{4}} \cdot \frac{1-x^{16}}{1-x^{8}} \cdot \frac{1-x^{32}}{1-x^{16}} \cdot \frac{1-x^{64}}{1-x^{32}} \\
& =\frac{1-x^{64}}{1-x}=1+x+x^{2}+\cdots+x^{63}
\end{aligned}
$$

It can be seen that weights from 1 to 63 grams can be measured, and the method is unique. In fact, the numbers from 1 to 63 expressed in binary are unique.