$2^1 + 2^2 + \cdots + 2^8$ in binary
In the binary system (much like in all numbering systems), order has meaning. If you write $0110$ this means $0\times2^3+1\times2^2+1\times2^1+0\times2^0$. Similarly, $11111111$ means $1\times2^7+1\times2^6+1\times2^5+1\times2^4+1\times2^3+1\times2^2+1\times2^1+1\times2^0=255$.

Now, assuming you had a function that produced a random bit as output, you would have 8 distinct bits if you called that function 8 times, which would form no kind of greater structure (that is, you would have e.g., 8 ones, but they would not mean 255 because they are not in an ordered structure, it's just 8 disjoint pieces of data).

On the other hand, if your function randomly selects the values of 8 bits and returns them, you would just have an array (or vector) of bits, which also do not represent a number.

In that sense, you can have the function output any number of bits you want. If you want two bits, you get 11 or 01 or 00 or 10, if you want three bits you get 111 or 000 or 100 or 010 or 001 or 110 or 101 or 011 etc. Note that in the way that you have phrased the question, these would not actually translate into numbers.