Writing and Reading data from RTC module_Arduino

Hi all,
i have took below code from https://lastminuteengineers.com/ds1307-rtc-arduino-tutorial/. i am not understand what these codes are doing. please help me to understand.

Wire.write((int)(eeaddress >> 8)); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB

Thanks

Wire.write((int)(eeaddress >> 8 )); // MSB
Wire.write((int)(eeaddress & 0xFF)); // LSB

This writes two bytes of the address to the EEPROM, i.e. most significant byte and least significant byte of the integer address.


Thanks for the reply. I am new to arduino. if u are explaining in clear text it's very usefull.
int eeaddress = 0;
(int)(eeaddress >> 8) -->what this line doing?
(int)(eeaddress & 0xFF) --> what this line doing?

Let’s say the address is

eeaddress = 0x0C4F MSB is 0C and LSB is 4C


eeaddress >> 8 shift integer bits eight times to the right = 0x0C (gets rid of the LSB)


eeaddress & 0xFF is 0x0C4F AND 0xFF = 0x4F (strips off the MSB)