I'm reading a code about an implementation of a function, the person who wrote the code, wrote this in his .h:
#define FT_LS_LONG (1 << 0)
#define FT_LS_RECURSIVE (1 << 1)
#define FT_LS_HIDDEN (1 << 2)
#define FT_LS_REVERSE (1 << 3)
#define FT_LS_TIME (1 << 4)
#define FT_LS_LINE (1 << 5)
Why did he used bitwise left shift and not something else? And, by what he could have replaced this part of the code? I'm aware that (1 << 0) == 0000 0001 (1 << 1) == 0000 0010, etc.. But I don't get how you can use those.