1. Reverse of a Binary

Can anyone help and let me know how can I reverse a Binary number, please ASAP.
What I mean is if I get 00000001 00000010 00000010 I should get as a result: 10000000 01000000 01000000.
void reverse_bit(unsigned char x, char *pt)
{
int t, i;
unsigned char hold;
char temp[8];
char tmp_bin[8];
char *pt2=0;

tmp_bin[0]='\0';
pt2 = tmp_bin;
display_binary(x, pt2);

hold = x;

for(t=1; t <count; t++)
{
if(hold & HIGH_BIT)
hold = ( hold << 1 | 1);
else
hold = hold << 1;
display_binary(hold, pt2);
}
x = hold;
strcpy(temp,"");
for(i = HIGH_BIT; i > 0; i = i/2)
{ if(x & i)
sprintf(temp, "%s1", temp);
else
sprintf(temp, "%s0", temp);
}

strcpy(pt,temp);}
this is what i did and it does not work.

2. Is it homework or exam ??

3. one way would be to store each 8 char grouping as a separate string, then reverse the string with one of the string reverse functions (depending what type of string you use) or derive your own string reverse function if that is the point of the exercise.

4. Can anyone help and let me know how can I reverse a Binary number, please ASAP.
Why? Written a decimal to binary conversion badly??