Let "a_1a_2...a_n" be a bit string of length "n". So, "a_i" can have two values for each "i\\in\\{1,2,...,n\\}". Then by Multiplication Principle the number of bit string of length "n" is "2\\cdot2\\cdot ...\\cdot 2=2^n".
Consequently, the number of bit strings of length 5 or less is equal to
"2+2^2+2^3+2^4+2^5=2+4+8+16+32=62."
Answer: 62
Comments
Leave a comment