\(D=\dfrac{1}{2}+\dfrac{1}{4}+\dfrac{1}{8}+..........+\dfrac{1}{256}+\dfrac{1}{512}\)
\(\Leftrightarrow2D=1+\dfrac{1}{2}+\dfrac{1}{4}+......+\dfrac{1}{256}\)
\(\Leftrightarrow2D-D=\left(1+\dfrac{1}{2}+.....+\dfrac{1}{256}\right)-\left(\dfrac{1}{2}+\dfrac{1}{4}+.....+\dfrac{1}{512}\right)\)
\(\Leftrightarrow D=1-\dfrac{1}{512}=\dfrac{511}{512}\)