Logic Gate Truth Tables
The rules and the AND table below are taken directly from our digital logic article. The OR and NOT outputs follow the rules stated in that same source.
- 5 gates in one table
- AND rows quoted from our source
- Four input combinations shown
- Includes NAND, NOR and XOR rules
Two-input gate reference
A two-input gate has four input combinations; a three-input gate has eight. The table shows the output for each combination.
| Gate | Rule from our article | A=0 B=0 | A=0 B=1 | A=1 B=0 | A=1 B=1 |
|---|---|---|---|---|---|
| AND (VE) | Output is 1 only when all inputs are 1 | 0 | 0 | 0 | 1 |
| OR (VEYA) | Output is 1 when at least one input is 1 | 0 | 1 | 1 | 1 |
| NAND | Inverted output of an AND gate | 1 | 1 | 1 | 0 |
| NOR | Inverted output of an OR gate | 1 | 0 | 0 | 0 |
| XOR | Output is 1 when the inputs differ | 0 | 1 | 1 | 0 |
How to use this reference
Digital circuits use two states: true or false, 1 or 0, high or low voltage. A logic gate produces a new signal from those states.
The AND example in our article uses a door that opens only when a key is turned and the handle is pressed: both inputs must be 1.
The OR example uses a room light controlled by two switches: one closed switch is enough to make the output 1.
The NOT gate has a single input and inverts it: input 1 gives output 0, and input 0 gives output 1. It is also called an inverter.
NAND and NOR are called universal gates because, as our article states, all other logic operations can be built from them. XOR is the basis of bit-addition circuits.
Real gates are not instantaneous: a short delay between an input change and the output change can accumulate in large circuits.
Related DersTeders pages
Digital logic gates articleThe full explanation with everyday examples.Logic simulatorBuild gates and watch the truth table live.All browser simulatorsMore hands-on tools for electronics lessons.Keep the reference close. Create a free account to save your place, open the simulators and follow the full electronics guides.
Topic trackingFrequently asked questions
When is an AND output 1?
Only when every input is 1. For two inputs the four outputs are 0, 0, 0 and 1.
How many rows does a truth table need?
A two-input gate has four combinations. Our article notes that a three-input gate has eight.
What is a NOT gate?
It has one input and returns the opposite value: 1 becomes 0 and 0 becomes 1. It is also called an inverter.
Why are NAND and NOR called universal?
Because all other logic operations can be created using only those gates, as stated in our digital logic article.
Interactive circuit guide
Run the simulation, follow the build steps one by one and try it in our real app.
Stopped
Step-by-step build