Data representation exercises
Data representation exercises
Review the contract
Record field name, byte order, signed rule, scale, unit, source time, quality, and format version. Swap byte order, omit the unit, send an older layout, repeat a missing value, and restart the gateway. Compare every decoded result with a known example.
Predict the Decoder Result
- Predict: The sender changes the scale from hundredths to tenths but keeps
09 C4. What does the same integer mean? Check: It becomes 250.0 °C, proving that bytes alone do not carry their unit or scale. - Predict: A receiver reads UTF-8 bytes as a different character set. Can the bit stream arrive intact while the label looks wrong? Check: Yes. Transport can preserve every bit while the text encoding contract still fails.
Technical boundaries. The decoding exercises assume a known example and an explicit contract covering byte order, signed values, scale, units, timing, quality, and format version. A result interpreted in hundredths stops applying when the sender switches to tenths: the unchanged bytes 09 C4 then represent 250.0 °C, even though transport preserved them.