Information Thermodynamics I