For positive temperatures (for example, 20°C):
- (20°C) / (1°C/count) = 20 → 14h → 0001 0100
- Convert the number to binary code with 8-bit, right-justified format, and
MSB = 0 to denote a positive sign.
- 20°C is stored as 0001 0100 → 14h.
For negative temperatures (for example, –20°C):
- (|–20|) / (1°C/count) = 20 → 14h → 0001 0100
- Generate the 2's complement
of a negative number by complementing the absolute value binary number and
adding 1.
- –20°C is stored as 1110 1100 → ECh.