i have problem with macro function in arduino.h

hi !! . recently , i refer to arduino.h and have problem with macro function
#define bit(b) (1UL << (b)) // i have tried to find note for it but i can
who body can help me !! how it work and what is type of unit UL
thank very much !!!
:stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue:

The UL means unsigned long. It makes the macro work with anything up to 32 bits. If you didnā€™t have the UL, then the 1 would be interpreted as an int and if you tried to use it with anything larger than 15 you would shift the one all the way off and the macro would return 0 instead of the bit value.

The << is the bitshift operator.

So this macro takes an argument b and tells you the value of the bit in that position. It is equivalent to writing 2^b (power not XOR).

bit(0) == 1
bit(1) == 2
bit(2) == 4
bit(3) == 8
bit(4) == 16

ohhh yeahhh !! thank very much i has known