The sequence #{1,1/2,1/4,1/8,..}# is a geometric series of the type #{a, a, ar^2, ar^3,....}#, in which #a# - the first term is #1# and ratio #r# between a term and its preceding term is #1/2#.
As the #n^(th)# term and sum up to #n# terms of the series #{a, a, ar^2, ar^3,....}# is #ar^(n-1)# and #(a(1-r^n))/(1-r)# (as #r<1# - in case #r>1# one can write it as #(a(r^n-1))/(r-1)#.
As such #n^(th)# term of the given series #{1,1/2,1/4,1/8,..}# is #1xx(1/2)^(n-1)# or #1/2^(n-1)#
and sum up to #n# terms of the series is #(1xx(1-(1/2)^n))/(1-1/2)# or
#((1-1/2^n))/(1/2)# or #2(1-1/2^n)#.
Note that when #n->oo#, #1/2^n->0# and hence sum of the series tends to #2#.