I came across this link on how to generate the bitwise represenation of any int , char on one of the forums.
showbits
The logic that the program uses is
[insert]
Code:
void bits_uint(unsigned int value)
{
unsigned int bit;
for ( bit = /* msb */(~0U >> 1) + 1; bit > 0; bit >>= 1 )
{
putchar(value & bit ? '1' : '0');
}
putchar('\n');
}
In the for loop the condition that the program uses is
for ( bit = /* msb */(~0U >> 1) + 1; bit > 0; bit >>= 1 )
What does this imply
bit >>= 1(greater than , greater than equal to ???????????????)
If i understand it now its supposed to mean
bit = bit >> 1;