You are designing a temperature measurement system using thermocouples. How would you implement cold-junction compensation in hardware or software to ensure accurate readings?