Simple Logic Gates

Logic gates are the fundamental building blocks of digital circuits. They perform basic Boolean operations on one or more binary inputs to produce a single binary output. All digital computers, from simple microcontrollers to complex CPUs, are constructed from billions of these tiny electronic switches implemented in silicon.

Basic Logic Gates

NOT Gate (Inverter)

The NOT gate has one input and one output. It simply inverts the input: 0 becomes 1, and 1 becomes 0.

AOutput
01
10

AND Gate

The AND gate produces a 1 output only when all inputs are 1.

ABA AND B
000
010
100
111

OR Gate

The OR gate produces a 1 output if at least one input is 1.

ABA OR B
000
011
101
111

NAND Gate (NOT AND)

The NAND gate is an AND gate followed by a NOT. It produces 0 only when all inputs are 1. NAND is universal—any other gate can be built using only NAND gates.

ABA NAND B
001
011
101
110

NOR Gate (NOT OR)

The NOR gate is an OR gate followed by a NOT. It produces 1 only when all inputs are 0. NOR is also universal.

ABA NOR B
001
010
100
110

XOR Gate (Exclusive OR)

The XOR gate produces 1 when the inputs are different (exactly one input is 1).

ABA XOR B
000
011
101
110

XNOR Gate (Exclusive NOR)

The XNOR gate produces 1 when the inputs are the same (both 0 or both 1). It is also called an equivalence gate.

ABA XNOR B
001
010
100
111

Applications

Logic gates are combined to form combinational circuits (adders, multiplexers, decoders) and sequential circuits (flip-flops, registers, counters). Every arithmetic operation, memory access, and decision in a computer ultimately reduces to the action of these simple gates operating billions of times per second.

Back to Misc


Copyright 2026 - MicroBasement