\(B=\dfrac{1}{2^2}+\dfrac{1}{2^3}+...+\dfrac{1}{2^{2017}}+\dfrac{1}{2^{2018}}\)
\(2B=\dfrac{1}{2}+\dfrac{1}{2^2}+...+\dfrac{1}{2^{2016}}+\dfrac{1}{2^{2017}}\)
\(\Rightarrow B=2B-B=\left(\dfrac{1}{2}+\dfrac{1}{2^2}+...+\dfrac{1}{2^{2016}}+\dfrac{1}{2^{2017}}\right)-\left(\dfrac{1}{2^2}+\dfrac{1}{2^3}+...+\dfrac{1}{2^{2017}}+\dfrac{1}{2^{2018}}\right)\)
\(\Rightarrow B=\dfrac{1}{2}-\dfrac{1}{2^{2018}}=\dfrac{2^{2017}-1}{2^{2018}}\)