Uploaded by Sanuth Rashmitha

Boolean Logic short notes-Computer

Boolean Logic
By Sanuth Rashmitha
Types of Logic Gates
AND gate
OR gate
NOT gate
NAND gate
NOR gate
XOR gate
XNOR gate
}
}
}
Basic Logic Gates
Combinational Logic Gates /
Universal Logic Gates
Special Logic Gates
Basic Logic Gates
AND gate
●
●
●
AND gate always has only one
output.
AND operation is similar to
multiplication.
If all inputs are 1, then only the
output is 1.
A
A.B
A AND B
B
Truth table
A
B
A.B
0
0
0
0
1
0
1
0
0
1
1
1
OR gate
A
●
●
●
OR gate always has only one output.
OR operation is similar to addition.
If all inputs are 0, then only the
output is 0.
A+B
A OR B
B
Truth table
A
B
A.B
0
0
0
0
1
1
1
0
1
1
1
1
NOT gate
●
●
NOT gate always has only one input
and one output.
NOT gate is also called the
“Inverter”.
_
A
NOT A
A
Truth table
A
_
A
0
1
1
0
Combinational/Universal Logic Gates
NAND gate
Formation of NAND gate
NOT
+
AND
=
+
+
=
NAND
●
●
●
NAND gate always has only one
output.
NAND gate outputs the opposite
values of AND gate.
NAND gate outputs 0, if all the
inputs are 1.
A
___
A.B
A NAND B
B
Truth table
___
A.B
A
B
A.B
0
0
0
1
0
1
0
1
1
0
0
1
1
1
1
0
NOR gate
Formation of NOR gate
NOT
+
OR
=
+
+
=
NOR
●
●
●
NOR gate always has only one
output.
NOR gate outputs the opposite
values of OR gate.
NOR gate outputs 1, if all the inputs
are 0.
Truth table
A
___
A+B
A NOR B
B
A
B
A+B
____
A+B
0
0
0
1
0
1
1
0
1
0
1
0
1
1
1
0
Special Logic Gates
XOR Gate
●
●
●
XOR is referred to as
Exclusive-OR gate.
If both inputs are the same, it
outputs 0.
If both inputs are different, it
outputs 1
Truth table
A
A⊕B
B
A XOR B
A⊕B
A
B
0
0
0
0
1
1
1
0
1
1
1
0
Universal Truth Table
A
B
OR
AND
NOR
NAND
XOR
0
0
0
0
1
1
0
0
1
1
0
0
1
1
1
0
1
0
0
1
1
1
1
1
1
0
0
0
*NOT gate cannot be used with 2 inputs.
Drawing Circuits
Eg:- X = ((NOT A XOR B) AND (B OR C)) OR (A NOR C)
_
A
_
A ⊕B
B
A
B
B
C
B+C
C
A
C
_____
A+C
X
Eg:- X = NOT (A AND B) OR (A AND NOT B)
_
A
_
B
X
A
B
A
_
B