< KS3 Computing < Logic

AND

The AND logic symbol for use in diagrams

AND - True when all of the inputs are true

With AND, the result is TRUE only when both A AND B are TRUE

ABA AND B
truetruetrue
truefalsefalse
falsetruefalse
falsefalsefalse

Example

Cpt Janeway's Spaceship (not to scale)

Cpt Jean-Luc Janeway is about to go on a space walk.

  • To leave the space ship Cpt Janeway must leave through the airlock, which contains an inner door and an outer door.
  • The inner door will only open when the outer door is closed AND the Airlock is pressurised.

Which of scenarios below results in Cpt Janeway being able to open the inner door?

ScenarioOuter Door ClosedAirlock Pressurised
AFalseTrue
BFalseFalse
CTrueTrue
DTrueFalse

Answer:

Scenario C

Extra

Cpt Janeway is now inside the airlock...

  • The Outer Door can only be opened once the airlock is de-pressurised
  • The airlock can only be de-pressurised once the inner door is closed

Challenge 1: Create a truth table (see above) to see how many scenarios meet the above criteria so Cpt Janeway can exit the airlock

Challenge 2: How many scenarios allow Cpt Janeway to leave the spaceship?

Answer:

1, The airlock is depressurised AND the inner door is closed

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.