Study Web

Digital Logic Foundations

Gates and Boolean Algebra

Logic gates are the fundamental building blocks of digital circuits. Boolean Algebra provides the mathematical framework to analyse and design gate networks.

What is a Gate?

A gate is an electronic component (transistors connected together) whose output is determined by its inputs. A single chip may contain anywhere from 4 gates to over 10 million.

Boolean Algebra — the mathematical foundation of digital design using logic gates. Every gate implements one Boolean operator.

Basic Logic Gates

NOT Gate

c = ā

Inverts the input. Also written with prime: c = a'

ac
01
10

OR Gate

c = a + b

Output is 1 if either input is 1. Operator '+' preferred over '∨'.

abc
000
011
101
111

AND Gate

c = a · b

Output is 1 only when both inputs are 1. Operator '.' preferred over '∧'.

abc
000
010
100
111

XOR Gate

c = a ⊕ b

Exclusive OR — output is 1 when inputs differ. Basis for modulo-2 addition.

abc
000
011
101
110

Inverted (N) Variants

NAND

c = a·b

NOT of AND. Universal gate — can build any other gate from NAND alone.

abc
001
011
101
110

NOR

c = a+b

NOT of OR. Also a universal gate.

XNOR

c = a⊕b

Output is 1 when both inputs are equal.

NAND is Universal: Any Boolean function can be implemented using only NAND gates. This was discovered by Charles Sanders Peirce in 1880.

Boolean Arithmetic Rules

AND: 1·1=1, 1·0=0, 0·0=0  |  OR: 1+1=1, 1+0=1, 0+0=0  |  XOR: 1⊕1=0, 1⊕0=1, 0⊕0=0

Combining Gates

Logic gates can be chained to build any desired function. Example: the circuit for A·B + C·D uses two AND gates feeding into an OR gate. The output depends only on current inputs — there is no memory of past state.

Important: Combinational circuits have no memory. Output is a pure function of current inputs only.

Gate Symbols in Logisim

SymbolOperatorLogisim iconDescription
·ANDOutput high only when both inputs are high
+OROutput high if either input is high
¬NOTInverts its input
XOROutput high when exactly one input is high
NANDInverted AND output
NORInverted OR output
XNORInverted XOR output