Hi, i found this Function to convert any integer into its BINARY VALUE... I could not make it through..
Can someone Help me out.... I need a good explanation on how it works...
Here is the code.
char *binString(int value)
{
static char bin[17];
int index;
for(index=0;index<16;index++)
{
if(value & 0x8000) // could not make out, what this does
bin[index]='1';
else
bin[index]='0';
value=value<<1; // and this one
}
bin[16]=0x00; // this one too
return(bin);
}