Simple answer is $4$-bits. Why $4$? Because $0$ is included. You need to count zero as one unit. So we have $9$ units in total. The number $8$ is the $9$th number in the sequence: $\{0,1,2,3,4,5,6,7,8\}$. Hope this made it clearer.
We can make a table of all the binary numbers that the computer use:
1: 0 0000
2: 1 0001
3: 2 0010
4: 3 0011
5: 4 0100
6: 5 0101
7: 6 0110
8: 7 0111
9: 8 1000 *
The first colum represents the unit (or quantifier), the second column represent the decimal number, the final colum represent the binary number containing four bits.
The $\log_2$ of $x$ is the power to which the number $2$ must be raised. Hence $\log_2(x) = y$ such that $2^y = x$.
$\log_2(8) = 3$.
$2^3 = 8$.
But, since the number $8$ is in the actual $9$th position, we have to add $+1$ when we compute the logarithm:
$\log_2(8+1) = \log_2(9) = 3.1699250014423126$
The computer cannot represent its value using $3.$something-bits, so we have to take the ceiling to be able to compress all numbers (including zero):
$\lceil\log_2(9)\rceil=\lceil3.1699250014423126\rceil=4$.
This should be enough. We can see however that $2^4=16$.
So we can conclude that with four bits we can compress/pack $16$-numbers in total:
$\{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\}$. That is from $0$ to $15$.
And number $8$ is in the $9$th position again.
Zero can be mistaken for not being treated as a quantity, so caution must be taken when computing with the base $2$ logarithm. Just add $1$ to fix it. Computer-registers are often restricted to $8$, $16$ or $32$ bits (which are power of twos). That is their numbers range from $0$ to $2^x-1$. As you can see their maximum value is $2^x-1$. The $-1$ shows some kind of symmetry to the notion that we have to add $+1$ to that log.
Edit: Also what Curtis F just stated, it depends on how you represent the numbers. You could indeed represent the number $8$ with just one bit, i.e. the mapping $\{0,1\}\rightarrow\{0,8\}$. But I don't think you want that.