DEPARTMENT OF COMPUTER SCIENCE &
INFORMATION TECHNOLOGY
Logic Design & Switching Theory
Course Code: CS-251
Semester: Spring 2020
Teacher Name: Talha Akhtar
Course Contents
Introduction of Subject
1. Digital fundamentals and Analog Quantities
2. Basic Logic Function & Boolean Algebra
3. Numbers Systems, Operations and Codes
4. Logic Gates
5. Fundamental Theorems of Boolean Algebra
6. Minimization of Boolean Functions
7. Karnaugh map
8. Simplification of Boolean Functions, POS
9. Function of Combinational Logic
[Link], Flip-Flops, and Timmer
Logic Gates
Logic Symbols used to represent the logic gates. Logic gates are the
basic building blocks of any digital system.
It is an electronic circuit having one or more one input or only one
output.
The relationship between the input and output is based on a
certain logic. Based on this logic gates are named as AND gate, OR
gate, NOT gate etc.
The NAND Gate
The NAND gate is a popular logic element because it can be used as
a universal gate.
NAND gates can be used in combination to perform the AND, OR ,
and the inverter operations.
The term NAND is a contraction of NOT-AND.
The AND function with a complemented (inverted) output.
The NAND Gate
The NAND Gate Operation
NAND gate produces a LOW output only when all the inputs are
HIGH.
If any input is LOW the output is HIGH.
Inputs A and B Output
A B AB NOT AB or NAND
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
The NAND Gate Operation
Logic Expression for a NAND Gate
The Boolean expression of the output of 2 inputs NAND Gate.
X = NOT (AB)
STEP 1
At first we solved A AND B
Step 2
Invert the output of step 1.
The NOR Gate
The NOR gate, like NAND.
It is also be used a universal gate, that is NOR gates.
The term NOR is a contraction of NOT-OR
It implies an OR function with an inverted or complemented
output.
The NOR Gate
The NOR Gate
Logic Expression for NOR Gate
The Boolean expression for the output of a 2 input NOR gate can be
written as:
X = NOT ( A OR B)
STEP 1
The two inputs variable of A OR B
STEP 2
Invert the output of step 1
The Exclusive - OR
Exclusive – OR Gate
Standard symbols for an exclusive-OR (XOR for XOR for shot) gate.
The XOR gate has only two inputs.
The exclusive-OR gate performs module-2 addition.
The output of an exclusive-OR gate is HIGH only when the two
inputs are at opposite logic levels. Input A and B, Output X.
The NOR Gate
Operation of a NOR Gate
A NOR gate produces a LOW output when any of the inputs is
HIGH.
When all inputs is LOW the output is HIGH.
Inputs A OR B Output
A B A+B NOT (A+B) or NOR
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
The Exclusive - OR
Exclusive – OR Gate
The Exclusive - OR
Exclusive – OR Gate
Inputs Output
A B NOT A NOT B NOT A(B) A(NOT B) A (EXCLUSIVE) B X= NOT A(B) + A(NOT B)
0 0 1 1 0 0 0 0
0 1 1 0 1 0 1 1
1 0 0 1 0 1 1 1
1 1 0 0 0 0 0 0
For an exclusive-OR gate, output is HIGH When input A is LOW and
input B is high or input A is HIGH and output B is LOW
The Exclusive - NOR
Exclusive – NOR Gate
It has only two inputs, the bubble on output of XNOR.
The output is opposite case of XOR.
If X is output is HIGH the input A is LOW and input B is HIGH or A is
HIGH and B is LOW.
The Exclusive - NOR
Exclusive – NOR Gate
The Exclusive - NOR
Exclusive – NOR Gate
Inputs Output
A B NOT A NOT B NOT A AB A (EXCLUSIVE NOR ) X= NOT A(NOT B) +
(NOT B) B AB
0 0 1 1 1 0 1 1
0 1 1 0 0 0 0 0
1 0 0 1 0 0 0 0
1 1 0 0 1 1 1 1
The Exclusive - NOR
Exclusive – NOR Gate
APPLICATION
Exclusive –OR gate can be used a two bit module-2 adder.
e.g.
0+0=0
0+1=1
1+0=0
1+1=1
Summary
NOT GATE
AND GATE
OR GATE
NAND
Summary
NOR
XOR
XNOR
END
Q/A