Centralized the computation of the high/low byte in modbus-core, since it is used frequently in both rtu and tcp cases