A simple bit-math question on register bit manipulation
I presume you are using an Atmel AVR with avr-libc based on the register names. In which case if you refer to the &lt;libc&gt;\include\avr\ directory, you will find files named after the processor. For example if you take the ATMega328p, there is a file called iom328p.h. Inside it we find a whole lot of things like:

#define DDRD _SFR_IO8(0x0A)
#define DDD0 0
#define DDD1 1
#define DDD2 2


Notice how DDRD is nothing but a special address for the DDRD register - imagine having to create a pointer to that register, having to look up it's address each time. It's much easier to #define it to a readable name.

Consider you want to write to the third bit in the DDRD register. You could do any of the following:

DDRD |= 1&lt;&lt;2;
DDRD |= 4
DDRD |= 1&lt;&lt;DDD2;


You will notice how DDD2 is simply #defined as the number 2, so it is identical to the other lines. It is however much more readable - especially if you want to refer to the datasheet which uses the same names for bits.

You might wonder - ah but I'll never ever want to look up that bit as I know it is 2. Well consider another example. Lets take the timers. We have for example:

#define TCCR0B _SFR_IO8(0x25)
#define CS00 0
#define CS01 1
#define CS02 2
#define WGM02 3
#define FOC0B 6
#define FOC0A 7


Now lets say we want to set the WGM02 bit to be a 1. We could do either of:

TCCR0B |= 1 &lt;&lt; 3;
TCCR0B |= 8;


But those are very unreadable - ridiculously so. Who know what 1 &lt;&lt; 3 is in the register - we'd have to look it up in the datasheet. On the other hand:

TCCR0B |= 1 &lt;&lt; WGM02;


is immediately obvious which bit it is setting.

Additionally there is an element of portability here. Many of the AVRs have the same timer module but have bits in different places - WGM02 might be in bit 1 in another AVR for example. 

If you moved to a different device later on, you would have to go through every random magic number, look up in the old datasheet what bit it corresponds to, match that with the new datasheet, and change the constant. Whereas if you use the #define, you know what bit it is without looking in the old datasheet, and you may not have to change it at all because the new #define will take care of it.



TL;DR; You are massively overthinking things. It is done purely for neatness and to make things easier to follow not harder.