AlgoPlus//structures / digital-logic
Read the theory

Digital Logic & Gates

The truth tables of the basic gates — and how two of them make a half adder.

Gate
AND
Step
1/1
Gate
Legend
Input A
Input B
Output
AI Tutor Workspace
In a nutshell
Logic gates are the smallest building blocks of a computer: tiny circuits that take one or two bits in and give one bit out, following simple rules like AND, OR, and NOT. Each gate's behaviour is captured by a truth table that lists the output for every possible input. Remarkably, the NAND and NOR gates are 'universal' — any circuit at all, right up to a whole processor, can be built from copies of just one of them.
Ready
Press play to begin the cinematic walkthrough.
Every gate is defined by its truth table. NAND and NOR are universal; Sum=A⊕B and Carry=A·B form a half adder — the cell arithmetic is built from.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Digital Logic & Gates.