Passer au contenu

Lesson 40: Logic on patrol

English

Two sensors, one decision

  • A robot often decides from two inputs at once: "Is the floor red?" and "Is there a wall?"
  • Each input is True (1) or False (0). A logic expression joins them with AND, OR, NOT or XOR.
  • The output is 1 or 0. Six stops give a row of six outputs.

Words for this lesson

Word Meaning
input a value that is 1 or 0, here from a sensor
logic expression inputs joined with AND, OR, NOT, XOR
XOR 1 when the two inputs are different
truth table the output for every combination of inputs

Se connecter ou créer un compte

IGCSE, A-Level & AP