I\'m converting an unsigned integer to binary using bitwise operators, and currently do integer & 1 to check if bit is 1 or 0 and output, then right shift by 1 to divide
You can reverse an unsigned 32-bit integer and return using the following reverse function :
unsigned 32-bit integer
reverse
unsigned int reverse(unsigned int A) { unsigned int B = 0; for(int i=0;i<32;i++){ unsigned int j = pow(2,31-i); if((A & (1<
Remember to include the math library. Happy coding :)