# KS3 Computing/Logic/And

< KS3 Computing | Logic

## AND

edit**AND** - True when all of the inputs are true

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

A | B | A AND B |
---|---|---|

true | true | true |

true | false | false |

false | true | false |

false | false | false |

### Example

editCpt 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?

Scenario | Outer Door Closed | Airlock Pressurised |
---|---|---|

A | False | True |

B | False | False |

C | True | True |

D | True | False |

**Answer:**

Scenario C

### Extra

editCpt 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