Getting started with logic gates

Signals in a digital circuit take just two values: 0 (low) and 1 (high). A logic gate turns a few 0s and 1s into another 0 or 1.

  1. AND: the output is 1 only when every input is 1.
  2. OR: the output is 1 when any input is 1.
  3. NOT: turns 0 into 1 and 1 into 0.
  4. XOR: the output is 1 when the two inputs differ.

Try it: drag two switches and an AND gate onto the canvas, wire the switches to the gate and the gate to an LED. Click the switches and watch when the LED lights up — the truth table on the right lists every combination.

The example below is a half adder: an XOR gives the sum of two bits and an AND gives the carry. That's the first step of how computers add.

Open the example in Norro: Half adder

← Learn