An automated system moves information through fixed stages: sensor, conversion, processor, actuator. Tracing means following one reading through those stages and writing down what each stage does.
This is the starting skill in automation and emerging systems, and it appears whenever a question describes a physical scenario and asks what the computer does.
What does each stage do?
- Sensor (input): measures a physical quantity such as temperature, light, pressure or motion.
- ADC (analogue-to-digital converter): turns a varying analogue signal into a digital value, when the sensor needs it.
- Processor: compares the value with a stored rule, for example “above 30”, and decides the output.
- DAC (digital-to-analogue converter): turns a digital value back into an analogue signal, when the output device needs it.
- Actuator (output): does something physical, such as spinning a fan or opening a valve.
Not every system needs both converters. Read the scenario and include only the stages it describes. Your own syllabus year is the final word on which terms you must use, so check the Cambridge page.
How do you trace one cycle?
- Write the rule in one line, with its threshold and comparison.
- Take the next reading from the sensor.
- Apply the comparison to that reading and note true or false.
- Record the output the actuator receives.
- Repeat for the next reading.
Worked example
A greenhouse fan controller runs five cycles. The sensor delivers 24, 27, 31, 29 and 26 (°C) in turn.
FOR cycle ← 1 TO 5
temp ← GetReading()
IF temp > 30
THEN
fan ← "ON"
ELSE
fan ← "OFF"
ENDIF
OUTPUT cycle, temp, fan
NEXT cycle
| cycle | temp | temp > 30 | fan |
|---|---|---|---|
| 1 | 24 | false | OFF |
| 2 | 27 | false | OFF |
| 3 | 31 | true | ON |
| 4 | 29 | false | OFF |
| 5 | 26 | false | OFF |
Only cycle 3 switches the fan on. In words: the sensor measures, the ADC converts, the processor finds 31 is greater than 30, and the actuator receives ON.
The mistake to watch for
A common slip is to treat the boundary as inclusive when the rule is not.
Mistaken answer: for a reading of 30, the fan is ON.
The student read “above 30” as “30 or more”.
The rule says temp > 30, so 30 > 30 is false and the fan stays OFF. If the rule were temp >= 30, the fan would switch on. Always copy the comparison symbol exactly into the trace table.
Check yourself
1. Using the same rule, what is the fan state for the readings 30, 30.5, 12?
Show answer
30 > 30 is false, so OFF. 30.5 > 30 is true, so ON. 12 > 30 is false, so OFF.
2. An automatic light has a light sensor, a processor and a lamp. Name the input device, the processor’s job and the output device.
Show answer
Input device: the light sensor. Processor’s job: compare the light reading with a stored value and decide whether the lamp should be on. Output device: the lamp (the actuator).
3. The rule is IF temp < 18 THEN heater ← "ON". The readings are 20, 18, 17. Give the heater state for each.
Show answer
20 < 18 is false: OFF. 18 < 18 is false: OFF. 17 < 18 is true: ON.
Where this leads next
Next, see how some systems use their own output to correct themselves in distinguishing feedback from a fixed sequence. The pseudocode trace trainer lets you step through rules like this one, and the Python reasoning sandbox shows the same rule as short Python.
If tracing is the step where marks slip for you, Computer Science tuition with an assigned teacher can focus on exactly that.