Let a1a2...an be a bit string of length n. So, ai can have two values for each i∈{1,2,...,n}. Then by Multiplication Principle the number of bit string of length n is 2⋅2⋅...⋅2=2n.
Consequently, the number of bit strings of length 5 or less is equal to
2+22+23+24+25=2+4+8+16+32=62.
Answer: 62
Comments