An analogue quantity changes smoothly and can take any value in a range, such as temperature, sound or light. A digital representation stores that quantity as a number made of bits, so it can only take a fixed set of values. Exam questions ask you to name which is which and to explain the conversion.
This lesson is the last in the hardware, software and systems module and connects to the sensor stage of the input-output pathway.
How does a real quantity become digital data?
- A sensor measures the real quantity and produces a smoothly varying signal.
- An analogue-to-digital converter (ADC) measures that signal at set times and rounds each measurement to the nearest available step.
- The computer stores and processes the resulting binary number.
- To control something in the real world, such as a speaker, a digital-to-analogue converter (DAC) turns numbers back into a smoothly varying signal.
With n bits there are 2n available steps. For 8 bits that is 28 = 256 steps, numbered 0 to 255.
Worked example
A classroom sensor measures temperature from 0 °C to 50 °C and uses an 8-bit converter (an invented, simplified setup). The reading is 28.4 °C. What number is stored, and what does it mean when converted back?
Step 1, steps available: 256 values, from 0 to 255.
Step 2, scale: 255 steps cover 50 °C, so 1 °C is 255 ÷ 50 = 5.1 steps.
Step 3, convert: 28.4 × 5.1 = 144.84. Round to the nearest whole step: 145. Stored in binary: 10010001.
Step 4, convert back: 145 × 50 ÷ 255 = 28.43… °C.
Step 5, compare: the stored value represents 28.43 °C, not 28.4 exactly. The small difference is the rounding caused by the limited steps.
Check the binary: 128 + 16 + 1 = 145. Correct.
What mistake do students make?
The usual slip is to say the quantity itself is digital because the computer shows it as a number.
Mistaken answer: “Temperature is digital because the screen shows 28.4.”
The screen shows a stored number. The temperature in the room is still analogue, changing smoothly.
The correction is to keep two things apart: the real quantity (analogue) and its stored number (digital).
Check yourself
1. Say whether each is analogue or digital: the loudness of a voice in a room, the number 0110 stored in memory.
Show answer
The loudness of a voice is analogue. The stored 0110 is digital.
2. How many different values can a 4-bit converter produce?
Show answer
24 = 16 values.
3. Why does the stored reading in the worked example differ slightly from 28.4 °C?
Show answer
The converter rounds to the nearest of its limited steps, so the stored step stands for a value close to, but not exactly, 28.4 °C.
Where does this lead next?
You have now covered the whole module. Test everything in the mixed practice set, and try the practical task and evidence checker to see how scenario work is checked.
If binary conversion or the converter idea still feels shaky, our teachers can slow it down in online one-to-one ICT tuition.