What is the meaning of the using 0x1 in #define?

c

Solution

It is the hexadecimal number 1, usually define like this when doing binary flags. So you would have

0x1
0x2
0x4
0x8
0x10

so you can see the bits you are setting.

Problem

I came across a line of code which had something like the below ``` #define IM 0x1 ``` I do know what IM stands for, but I am intrested in knowing what `0x1` stands for and what is its use and its significance for usage in define statements. I am new to C and I did search for this particular item but could not find it. Thanks in advance for all your help.

Original source