char* endptr;
int binary = strtol("1000",endptr,2);
will convert ascii (1's and 0's) to a value
for the conversion back to ascii i dont know of a function but i have used
char strBinary[32];
for(int i = 0,int j = 31;i<32;i++,j--)
{
strBinary[j] = (binary & 1<<i ? '1':'0');
}
Good luck... and if you find an easier method to go from value to binary let me know please.
Matt