LightMySky
به انگلیسی

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.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • 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

1 · Read

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.

Try it together

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.

0 0 gives 00 1 gives 11 0 gives 11 1 gives 1
Try it together

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=1, B=0AND gives 00 OR C=1output 1

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.

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.

2 · Watch

به انگلیسی

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Then practise

8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Logic Gates and Truth Tables · Computing, ages 15 to 16 · LightMySky