Question: I am new to C and learning how bit-wise operator works in C.I wanted to check if most significant of an address is set or not

```
  int main()
  {

   int addr=0x0fffffff;

   if(addr&0x80)
   {
      Printf("Bit is set");
   }
    else
     printf("Bit is not set");
     return 0;
   }

```

EDIT: I Would like 0x80 to be represented as 1000 0000 0000 0000 0000 0000 0000 0000 ,I have seen such implementation in past where no need of writing all the bits using some macros but not able to recall it where?

Answer: 
Your code
 int addr=0x0fffffff;
and
 if(addr&0x80)
causes this condition always true.

```
0x0fffffff  => 0000 1111 1111 1111 .... 1111 1111
where 0x80  =>                          1000 0000
-------------------------------------------------
bitwise AND                             1000 0000 -> non zero means true!

```
In `c` every `non zero` value is `true`. So your condition will be true. 

Your condition will evaluate to `10000000b = 128 = true`