The eeprom has two address bits set internally so that its address is always 0xA? with the ? supplied by the lower 3 address bit, so you can have 8 addresses starting at 0xA0. The I2C device address is 7 bits wide with the 8th LSB indicating either an I2C Read (logic 1) or I2C Write (Logic 0). So you have only 7 bits in an I2C device address.
i2cAddr = 0xA0 | ((value & 0x0007) << 1);
What is happening in the code above is the value set by the user is bit masked with the 3 LSB to allow only valid address through. Next this value is shifted 1 location to the left so that it can be ORed bit for bit with the 7 bit base address..
I See, Thanks, a lot.