well, the approach I would take is to generate a random number between 0 and 255 and then have a function to convert to string. The other approach would be to generate 8 random numbers between 0 & 1 but I tend to see that the rand function does not behave very randomly with small numbers.
Matt
P.S. But remember, an 8 bit string is not really 8 bits... it is 8 bytes.