---
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-11-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

Text, pictures and sound are all stored as 1s and 0s. Logic gates are the tiny circuits that work on those bits. A NOT gate takes one input and flips it, so 1 becomes 0. An AND gate gives 1 only when both inputs are 1. An OR gate gives 1 when at least one input is 1.

**Example.** A truth table lists every input pair beside its output. With two inputs there are four rows: 0 0, 0 1, 1 0 and 1 1. AND outputs 1 in only one row, 1 1. OR outputs 0 in only one row, 0 0.

**Example.** Gates chain when one output feeds the next input. In (A AND B) OR C with A = 1, B = 0 and C = 1, the AND gives 0, then 0 OR 1 gives 1. A NOT can feed a gate too: it flips its input before the next gate sees it. Start at the gates nearest the inputs and write each output on its wire before moving on.

A written rule maps to gates through its joining words. A rule that needs both parts true uses AND. A rule that needs either part uses OR. A rule with the word not uses a NOT gate. Take an umbrella if it rains or snows, so that rule is an OR gate. The and, or and not in code follow the same rules.

**Recap.** NOT flips, AND needs both, OR needs one. Trace chains gate by gate, and turn the and, or and not in a rule into gates.

*Lesson text, worked examples, flashcards and practice questions with worked steps, written for this dataset. The boots and graduation scenarios follow examples in the academy articles Logic gates and Compound Booleans with logical operators.*

## Practice

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

## Needs first

- [Compression: Lossy and Lossless](https://lightmysky.com/learn/computing/compression-lossy-and-lossless-mt_lx2U-B9CFa)

## Optional connections

- [Boolean Expressions and Comparison Operators](https://lightmysky.com/learn/computing/boolean-expressions-and-comparison-operators-mt_0aIh-DPCZ4)

## 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)
