Boolean Algebra
Boolean Algebra
• The digital circuit present in a digital computer are designed
using mathematical discipline known as Boolean Algebra.
• It describes the relationship between the input and outputs of
a digital circuit.
• Named in honor of George Boole, an English Mathematician
• Has 2 possible values true or false.
Logic gates
• Primary logic gates
– AND Gate
– OR Gate
– NOT Gate
• Universal gates
– NAND Gate
– NOR Gate
• Special gates
– XOR Gate
– XNOR Gate
Logic gates
A AND B = A.B
A OR B = A+B
NOT A A’
AND Gate
A circuit which performs an AND operation. It has n input (n >= 2) and
one output.
Logic diagram Truth Table
OR Gate
A circuit which performs an OR operation. It has n input (n >= 2) and one
output.
Logic diagram Truth Table
NOT Gate
A circuit which performs an NOT operation. It has n input (n >= 2) and
one output.
Logic diagram Truth Table
Universal logic gates
A universal gate is a gate which can implement
any Boolean function without need to use any
other gate type. The NAND and NOR gates are
universal gates. In practice, this is advantageous
since NAND and NOR gates are economical and
easier to fabricate(to build-up) and are the
basic(primary) gates used in all IC
digital logic families.
Universal logic gates
• NAND Gate
A NOT-AND operation is known as NAND operation. It has n input (n >= 2)
and one output.
Logic diagram Truth Table
Universal logic gates
• NOR Gate
A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and
one output.
Logic diagram Truth Table
Gate Universality – NAND gate as NOT gate
In one NAND gate when all inputs are same it
woks as NOT gate. Figure shows a NAND gate
working as NOT gate.
X= =
Gate Universality – NAND gate as AND gate
To work as AND gate it requires 2 NAND gates.
Figure shows a NAND gate working as AND gate.
X = = A.B
Gate Universality – NAND gate as OR gate
To work as OR gate it requires 3 NAND gates.
Figure shows a NAND gate working as AND gate.
X = = = A+B
Gate Universality – NOR gate
XOR Gate
XOR or Ex-OR gate is a special type of gate. It can be used in the half
adder, full adder and subtractor. The exclusive-OR gate is abbreviated as
EX-OR gate or sometime as X-OR gate. It has n input (n >= 2) and one
output.
Logic diagram Truth Table
XNOR Gate
XNOR gate is a special type of gate. It can be used in the half adder, full
adder and subtractor. The exclusive-NOR gate is abbreviated as EX-NOR
gate or sometime as X-NOR gate. It has n input (n >= 2) and one output.
Logic diagram Truth Table
Boolean Algebra
A B A+B
0 0 0
0 1 1 A
1 0 1 0 1
1 1 1 1 0
A B A.B
0 0 0
0 1 0
1 0 0
1 1 1
DeMorgan's Theorem
• French mathematician DeMorgan formulated 2
theorems in 1953 & they are known as
DeMorgan’s Theorems.
• For 2 variables A & B,
=
=
• For 3 variables A, B & C
=
=
DeMorgan's Theorem
DeMorgan's Theorem