Answer
a) 30
b) 480
Work Step by Step
a) Bit strings of 1 to 4 digits = Sum of all strings with 1,2,3,4 digits.
for n digits, we have the number of bits = $2^{n}$ as every bit can be 0 or 1.
So Bit strings of digits 1-4 =($2^1+2^{2}+2^{3}+2^{4}$) = 2+4+8+16 = 30
b) Similarly, Bit strings having 5-8 digits = ($2^5+2^{6}+2^{7}+2^{8}$) = 32+64+128+256 = 480