DersTeders — ücretsiz, kurulum yok, her seviyede konu anlatımı ve sorular.

Logic gates: AND, OR, NOT and truth tables

Computers and control systems are built from signals with only two states: true or false, 1 or 0. Logic gates combine those signals into new ones.

2026-11-23

Two-state signals

Inside digital devices, millions of tiny circuits work with signals that are either high or low — true or false, 1 or 0. A logic gate is a structure that compares such signals and produces a new one. Understanding a few basic gates is enough to read most digital diagrams.

The AND gate

The output of an AND gate is 1 only when every input is 1. Think of a door that opens only if both the key turns and the handle is pressed. If either condition is missing, the output stays 0.

The OR gate

An OR gate gives 1 when at least one input is 1. If a room can be lit by either of two switches, that is OR logic. Only when all inputs are 0 does the output become 0.

The NOT gate

The NOT gate has a single input and returns the opposite of it: input 1 gives output 0, input 0 gives output 1. It is also called an inverter, and it is the simplest gate of all.

Truth tables

A gate is fully described by a table that lists the output for every input combination. For a two-input AND gate: A=0,B=0 gives 0; A=0,B=1 gives 0; A=1,B=0 gives 0; A=1,B=1 gives 1. Two inputs mean four rows; three inputs mean eight.

Combined gates and delay

Inverting the output of AND and OR gives NAND and NOR. These are called universal gates because either one alone can build every other logic function. XOR outputs 1 when its inputs differ and underlies binary addition. Real gates switch with a small delay, which accumulates in large circuits; a waveform view helps spot the resulting races.

Frequently asked questions

When is an AND gate output equal to 1?

Only when all of its inputs are 1. If even one input is 0, the output is 0.

How many rows does a three-input truth table have?

Eight, because three inputs have eight possible combinations. A two-input gate has four.

Why are NAND and NOR called universal?

Because either gate alone can be combined to produce every other logic function, including AND, OR and NOT.

Create a free account — save your progress

Save my notes

Keep learning