An automated greenhouse control system uses sensors and logic gates to control a water pump. The pump turns ON (P = 1) when: The soil moisture is low (M = 0...

Assessment: Computer Science (9-1) 0984 | Paper 2 Mock 01 | Algorithms, Programming and Logic Subject: Computer Science (9-1) - 0984

Question 1 Report

An automated greenhouse control system uses sensors and logic gates to control a water pump.

The pump turns ON (P = 1) when:

  • The soil moisture is low (M = 0) AND it is daytime (D = 1)
  • OR when the manual override switch is on (O = 1)

(a) Write the Boolean expression for P. [3]

Answer Details

(a) Boolean expression for the pump: [3]

P = (NOT M AND D) OR O

[1] for NOT M (soil moisture is low when M=0, so NOT M = 1), [1] for AND D (must be daytime), [1] for OR O (manual override).

The pump turns on in two situations: automatically when soil moisture is low (M=0, so NOT M=1) during daytime (D=1), or whenever the manual override switch is on (O=1) regardless of other conditions. The OR means either path activates the pump.

Note that M=0 means moisture is low (the sensor reads 0 for dry soil), so NOT M converts this to 1 for the logic to work. If M=1, the soil is already moist and automatic watering is not needed.

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning