Easy logic op in the chat

programming
Tags: #<Tag:0x00007f24232fbef0>

#1

unsigned int Solution::reverse(unsigned int a) {

 int b=0;
 for(int i=0;i<32;i++)
 {
    b=b<<1;
    b=b|a&1;
    a=a>>1;
 }
  return b; 

}