Breadbit

Breadbit › Guides › Logic gates and truth tables

Logic gates and truth tables

From a single inverter to a full adder, one truth table at a time.

What a logic gate does

A logic gate takes one or more inputs that are either 0 (low) or 1 (high) and produces an output according to a fixed rule. A truth table lists the output for every possible input combination: with n inputs there are 2n rows.

The six basic gates

Two-input gates (A, B → output)
ABANDORNANDNORXOR
0000110
0101101
1001101
1111000
NOT gate (inverter)
ANOT A
01
10

The chips in Breadbit

Wiring a chip

  1. Place the chip across the centre gap, then connect VCC (pin 14) to the positive rail and GND (pin 7) to the negative rail. Without power the chip shows “NOT POWERED”.
  2. Create inputs with the manual inputs (labelled A, B, C and onwards) or with a switch and a pull-down resistor.
  3. Read the output with the logic probe, which shows 0 or 1 at any hole.

Verify a truth table in the lab

The “Verify” practicals show input toggles and a truth table. Flip the inputs through every combination and each row that matches the chip’s real output is ticked off, so you know when the whole table has been verified.

NAND builds everything

NAND is a universal gate. Using only NAND gates you can build the others:

Breadbit includes practicals that build NOT, AND and OR from NAND gates, and others that combine gates into adders and parity checkers.

Open the Breadbit simulator