---
title: "Logic Gates and Truth Tables"
description: "The and, or and not circuits that everything else is built from, and the table that fixes what each one outputs for every possible input."
canonical: https://lightmysky.com/learn/computing/logic-gates-and-truth-tables-mt_o2N0-q3A4Q
source: https://lightmysky.com/learn/computing/logic-gates-and-truth-tables-mt_o2N0-q3A4Q.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Logic Gates and Truth Tables

The and, or and not circuits that everything else is built from, and the table that fixes what each one outputs for every possible input.

Subject: Computing · Area: Computer Systems · Ages 15 to 16
Page: https://lightmysky.com/learn/computing/logic-gates-and-truth-tables-mt_o2N0-q3A4Q

## Ready when they can

- Complete the truth table for AND, OR and NOT
- Work out the output of two gates wired together
- Match a written condition to the gates that would compute it

## Lesson: Yes, no, and both at once

Gates are tiny circuits that decide with 1s and 0s. NOT takes one wire and flips it. AND needs both inputs true, while OR needs just one. Three gates, endless decisions.

**Example.** A truth table lists every input pair with its output. AND shows true only once, for true and true. OR shows false only once, for false and false.

Gates chain into circuits when one output feeds the next input. Take A and B through AND, then OR that answer with C. To read any circuit, trace one gate at a time with pencil and paper.

**Tip.** Your code mirrors this hardware: and, or and not behave the same in both. If rain or hiking means boots, that or is the same OR as the gate.

**Recap.** NOT flips, AND wants both, OR wants one, and truth tables with wired chains turn those rules into real decisions.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Boolean Expressions and Comparison Operators](https://lightmysky.com/learn/computing/boolean-expressions-and-comparison-operators-mt_0aIh-DPCZ4)
- [Compression: Lossy and Lossless](https://lightmysky.com/learn/computing/compression-lossy-and-lossless-mt_lx2U-B9CFa)

## Opens up

- [Boolean Algebra and Simplifying Logic Expressions](https://lightmysky.com/learn/computing/boolean-algebra-and-simplifying-logic-expressions-mt_9MrE1N63D5)
- [Inside the CPU: Fetch, Decode, Execute](https://lightmysky.com/learn/computing/inside-the-cpu-fetch-decode-execute-mt_YT-FSWnUKR)
