Beacon's reading counter has been ticking up all day. Comet checks it: 255 readings.
"One more reading," she says, and taps the counter. Nothing changes. Then an error light blinks.
Wren frowns. "It only has eight bits. 255 is the biggest number it can hold."
Nova projects eight cards, all face up. "Interesting," she says. "Where would the next card go?"
Comet looks at the empty space to the left. "There is no ninth card. That is an overflow!"
Wren pins a temperature chart beside the counter. "And after that, let's see how Beacon stores a smooth curve."
Part 1: make eight bit cards, encode Beacon's readings, and find the overflow.
Part 2: sample a smooth temperature curve on graph paper.
Analog data have values that change smoothly over time, like the pitch and volume of music or the colors of a painting.
The greenhouse temperature rises and falls smoothly through the day.
Sampling measures an analog signal at regular intervals, called samples. Digital samples can closely approximate analog data.
Using digital data to approximate real-world analog data is an example of abstraction.
| Hour | 0 | 4 | 8 | 12 | 16 | 20 | 24 |
|---|---|---|---|---|---|---|---|
| Temperature reading | 20 | 18 | 30 | 52 | 60 | 41 | 22 |
| What the lab shows | True or false? |
|---|---|
| Eight bit cards can show any whole number from 0 to 255. | ? |
| Eight bit cards can show 256. | ? |
| Straight lines between samples match the smooth curve exactly. | ? |
| Sampling more often gives a closer approximation. | ? |
Excellent lab work. Tomorrow you will see one byte mean three different things.