How the SPI bit are defined?

In SPI sample there are setup SPI as the follwing:
SPCR |= ( (1<<SPE) | (1<<MSTR) ); // enable SPI as master

In Atmega168, the SPCR is a SPI control Register, the SPE is bit7 & the MSTR is bit4 of that register. The above code is set the SPCR bit 7 & bit4 to 1 … but I am a straight FW code, I would like to know why the SPE & MSTR only shift LEFT once, I guess there is some definitions some where to set/mask the bit to match the above code

I could not find anywhere telling about this matter … can someone help? :-?

They’re not being shifted left once. The one is being shifted by the right amount. So if SPE is 7, that’s (1 << 7) which works out to B10000000.

Thanks for the explanations, it is very clear to me now! :)