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 ride at a fair can start (X = 1) only when three things are all true: the gate is closed (G = 1)…
MediumComputer ScienceHigh School (9–10)Computer Science › Boolean LogicConceptualNumericalIGCSE

A ride at a fair can start (X = 1) only when three things are all true: the gate is closed (G = 1)…

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 ride at a fair can start (X = 1) only when three things are all true: the gate is closed (G = 1), every seat belt is fastened (F = 1) and the operator presses the start button (O = 1).

  1. Every gate in the syllabus has at most two inputs. How many AND gates do you need?
  1. How many rows does the full truth table have?
  1. In how many rows does the ride start?

Check your answer

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

Need a reminder? The key ideaShowHide

AND gives 1 only when both inputs are 1: X = A AND B, output column 0, 0, 0, 1. The rows of a truth table go in binary order: 0 0, 0 1, 1 0, 1 1. A gate in this syllabus has at most two inputs, so three conditions joined by AND need two AND gates.

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 gates. One AND gate joins G and F. A second AND gate joins that output with O. So X = (G AND F) AND O, with 222 AND gates.

Step 2. The rows. Three inputs, each 0 or 1, give 2×2×2=82 \times 2 \times 2 = 82×2×2=8 rows.

Step 3. The output. The ride starts only when all three inputs are 1. That is 111 row, the last one.

Watch out. Do not draw one AND gate with three inputs. In this syllabus every gate except NOT has exactly two inputs.

Answer: (a) 222. (b) 888. (c) 111.

Log in to save this for later
← All Problems
← A microwave oven heats food only when its door is closed (D = 1) and the start button is pressed (S…A student was asked for the truth table of an AND gate… →
More onComputer Science › Boolean Logic

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. The AND gateNOT, 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
  4. 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 →