HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A plant-watering controller has three inputs…
HardComputer ScienceHigh School (9–10)Computer Science › Boolean LogicConceptualNumericalIGCSE

A plant-watering controller has three inputs…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A plant-watering controller has three inputs. Its circuit, drawn below, joins A and B in an OR gate. That output, P, meets C at an AND gate whose output is X.

A logic circuit drawn with the standard gate symbols. Inputs A, B and C are on the left and the output X is on the right. A and B go into an OR gate; the output of the OR gate and C go into an AND gate, whose output is X. The output of the OR gate is labelled P.
  1. Give the logic expression.
  1. Count the input patterns that switch the watering on.
  1. Find X when A = 1, B = 0, C = 1, and when A = 1, B = 1, C = 0.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

OR gives 1 when at least one input is 1: X = A OR B, output column 0, 1, 1, 1. In a circuit, the output of one gate is an input of the next. Add a middle column for each gate's output and work from the inputs to the output.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. The expression. X = (A OR B) AND C.

Step 2. The truth table. Work out P, then X.

A B CPX
0 0 000
0 0 100
0 1 010
0 1 111
1 0 010
1 0 111
1 1 010
1 1 111

X=1X = 1X=1 in 333 rows: 0 1 1, 1 0 1 and 1 1 1.

Step 3. The two rows asked for. For 1 0 1: P = 1 and C = 1, so X = 111. For 1 1 0: P = 1 but C = 0, so X = 000.

Check. X needs C = 1 and at least one of A and B. There are three ways to have at least one of A and B, so three rows. That matches.

Answer: (a) X = (A OR B) AND C. (b) 333 rows. (c) 111 and 000.

Log in to save this for later
← All Problems
← Asha builds a two-gate circuit on a breadboard…Three circuits are built from NOT, AND and OR gates: X = NOT (A OR B); Y = (NOT A) AND (NOT B); Z =… →
More onComputer Science › Boolean Logic

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. The OR gate and joining two gatesNOT, AND and OR Gates

More on this topic

  1. A truth table with inputs A, B and C has the output column 0, 1, 0, 1, 0, 1, 0, 0 in the usual row…Hard
  2. A water heater has a safety cut-out. The cut-out switches the heater off (X = 1) when the water is…Hard
  3. A logic analyser records X for every input pattern of A, B and C, from 0 0 0 up to 1 1 1: 0, 0, 0…Medium
A lift moves (X = 1) when its door is shut (S = 1) and a button is pressed…Easy
  • A traffic-light controller contains the circuit drawn below…Hard
  • All problems on this topic →