Tricky Circuit

The NAND logic gate

Build a decision with two switches

NAND means NOT AND: first ask whether both inputs are 1, then reverse that answer. A logic gate performs a rule on digital inputs. In this ideal 5 V model, logic 0 means 0 V and logic 1 means 5 V; these are voltage states, not counts of electrons.

Open interactive experiment

EXPERIMENT BENCH

Change the circuit settings, predict the readings, then check a challenge. These are learning models, with the assumptions explained in each lesson.

Sign in to save progress. Guest progress stays on this device.

Open laboratory in a full window

How it works

Ideal truth table only. Defined inputs have no floating state; actual thresholds, delays and output load limits are omitted. This is not a hardware-tested chip model.

Y = NOT(A AND B). A and B are inputs; Y is output. Only A = 1 and B = 1 makes Y = 0. Any zero input makes Y = 1. Power must be on to obtain the model output.

Difficulty
  1. Build · Observe

    Power on with A = 0 and B = 0. Obtain output 5 V (logic 1).

    Need a hint?

    A=0; B=0 → Y=1; 5 V

  2. Explore · Adjust

    Set both inputs to 1. Obtain output 0 V (logic 0).

    Need a hint?

    A=1; B=1 → Y=0; 0 V

  3. Solve it · Discover the limit

    Set A = 1 and B = 0. Obtain output 5 V and explain why one low input is enough.

    Need a hint?

    A=1; B=0 → Y=1; 5 V

Extra reading and circuit recipes

Build a decision with two switches

A useful connection

Connect both NAND inputs to the same defined signal and the gate becomes an inverter: 0 becomes 1 and 1 becomes 0.

A surprising detail

Boolean logic uses two states, 0 and 1. Networks made only of NAND gates can implement any rule in that logic: NAND is a universal gate.

A useful trap to avoid

The sliders represent driven logic levels. An unconnected physical input is not automatically logic 0.

A stays 0 while B changes from 0 to 1. Y…

  1. changes to 0
  2. stays 1
  3. becomes undefined
Read more

With A = 0, A AND B is always 0, so NOT makes the output 1.

ti.com

Temu affiliate offers

Find your next electronics project

Explore these do-it-yourself project kits. Check the selected option, included parts and instructions on each offer.

Tricky Circuit may earn a commission if you buy through these Temu affiliate links. These are product ideas; they have not been bench-tested by Tricky Circuit and are not verified lesson parts lists.

Supplier photo of an assembled infinity mirror light cube illuminated on a dark background.

Supplier product photo

Build an infinity light cube

Listing specifies 5-volt direct current. Soldering required; battery and glue not included.

View kit on Temu

Supplier photo of a breadboard, jumper wires and assorted electronic components in a plastic storage case.

Supplier product photo

Try breadboard experiments

Breadboard, wires and assorted parts. Arduino controller board not included.

View kit on Temu

Supplier photo of an assembled blue surface-mount soldering practice board with a circular ring of small lights.

Supplier product photo

Solder a chasing-light board

Surface-mount soldering practice. Battery and battery holder not included.

View kit on Temu