USART Programming AVR microcontroler
Assume you want a BAUD_PRESCALER = 1024. 

The binary representation of 1024 is: 0b00000100 00000000. 

I've put a space after 8 bits so that you can distinguish between the 8 least significant  bits (LSBs) from the 8 most significant bits (MSBs). In order to configure the UBRR registers, you have to put the 8 MSBs in the UBRRH register, and the 8LSBs in the UBRRL register. To do this, you can simply typecast BAUD_PRESCALER to a uint8_t to get the LSBs:

UBRRL = (uint8_t)(BAUD_PRESCALLER);


This will assign 0b00000000 to UBRRL, since the 8 MSBs will be discarded due to the typecast. Remember, the typecast to uint8_t will only give you the 8 LSBs of whatever number you give it.

Now, for the UBRRH register, you first need to shift the 8 MSBs into the LSBs in order for the typecast to work correctly. So 0b00000100 00000000 must become 0b00000100, hence the right shift by 8 bits:

UBRRH = (uint8_t)(BAUD_PRESCALLER&gt;&gt;8); //Shifts BAUD_PRESCALLER MSBs into the LSBs