Understanding i2c Wire communication

I am trying to understand code in a library for a temperature and humidity sensor. The Library works correctly but I do not understand how. The function to write commands to the sensor is:

void Adafruit_SHT31::writeCommand(uint16_t cmd) {
  Wire.write(cmd >> 8);
  Wire.write(cmd & 0xFF);

My question about this snippet of code:

  1. The address for the device is 0x44 (1000100) which is 7 bit; according to the data sheet the 8th bit should be 1 if reading and 0 if writing, where is this assigned in the code since the only thing given to Wire.beginTransmission was a 7 bit address?

  2. Lets say that cmd in this example is 0x30A2 (0011000010100010) which is a reset command for the sensor. I understand that the two write commands are giving the MSB and the LSB but how? The argument to the write functions are still 16 bits long just with the first 8 bits all 0. Why not just send cmd by itself in one line? i.e. Wire.write(cmd);

Thanks in advance for any help you may provide.

  1. Yes the address has 7 bits, it is I2C protocol specifics. All things are managed inside of library functions. For better understanding you have to study the Wire and twi files. In the twi.c readFrom, writeTo is something like this:
  // build sla+w, slave device address + w bit
  twi_slarw = TW_WRITE;
  twi_slarw |= address << 1;
  1. No, Wire and other libraries use common Stream and Print where the write function is defined to sending bytes. It is defined by design.