\(M=\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{16}+...+\frac{1}{502}+\frac{1}{1024}\)
\(M\cdot2=\left(\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{16}+...+\frac{1}{502}+\frac{1}{1024}\right)\cdot2\)
\(M\cdot2=\frac{1}{2}\cdot2+\frac{1}{4}\cdot2+\frac{1}{8}\cdot2+\frac{1}{16}\cdot2+...+\frac{1}{502}\cdot2+\frac{1}{1024}\cdot2\)
\(M\cdot2=1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+...+\frac{1}{504}\)
\(M\cdot2-M=\left(1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+...+\frac{1}{502}\right)-\left(\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{16}+...+\frac{1}{502}+\frac{1}{1024}\right)\)
\(M=1-\frac{1}{1024}\)
\(M=\frac{1023}{1024}\)