0% found this document useful (0 votes)
3 views37 pages

Week 11 & 12_Logic_gates

The document provides an overview of logic gates, including AND, OR, NOT, NAND, and NOR gates, detailing their functions, truth tables, and implementations. It explains how to construct logic circuits from Boolean expressions and highlights the universality of NAND and NOR gates in implementing any Boolean expression. Additionally, it outlines steps for designing combinational circuits and includes references for further reading.

Uploaded by

kamalfaiyeas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views37 pages

Week 11 & 12_Logic_gates

The document provides an overview of logic gates, including AND, OR, NOT, NAND, and NOR gates, detailing their functions, truth tables, and implementations. It explains how to construct logic circuits from Boolean expressions and highlights the universality of NAND and NOR gates in implementing any Boolean expression. Additionally, it outlines steps for designing combinational circuits and includes references for further reading.

Uploaded by

kamalfaiyeas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Logic Gates

Course Code: CSC 1101 Course Title: Introduction to Computer Studies

Dept. of Computer Science


Faculty of Science and Technology

Lecturer No: Week No: 11 & 12 Semester: Spring 24-25


Jubayer Ahamed ([email protected] )
Lecture Outline

❖ Understanding Logic Gate and the use of


these.
Specific Objectives

❖ Logic gates

❖ Logic circuits and Boolean expressions

❖ Combinational circuits and design


Logic Gate

▪ Logic gates are electronic circuits that operate on one or more


input signals to produce standard output signal

▪ Are the building blocks of all the circuits in a computer

▪ Some of the most basic logic gates are AND, OR, NOT.
AND Gate

• Physical realization of logical multiplication (AND) operation.


• Generates output signal of 1 only if all input signals are also 1
AND Gate (Block Diagram Symbol and Truth
Table)
OR Gate

▪ Physical realization of logical addition (OR)


operation
▪ Generates an output signal of 1 if at least one of
the input signals is also 1
OR Gate (Block Diagram Symbol and Truth Table)
NOT Gate

▪ Physical realization of complementation operation


▪ Generates an output signal, which is the reverse of
the input signal
NOT Gate (Block Diagram Symbol and Truth Table)
NAND Gate

▪ Complemented AND gate


▪ Generates an output signal of:

▪ 1 if any one of the inputs is a 0


▪ 0 when all the inputs are 1
NAND Gate (Block Diagram Symbol and Truth
Table)
NOR Gate

▪ Complemented OR gate
▪ Generates an output signal of:

▪ 1 only when all inputs are 0


▪ 0 if any one of inputs is a 1
NOR Gate (Block Diagram Symbol and Truth Table)
Logic Circuits

▪ When logic gates are interconnected to form a gating / logic


network, it is known as a combinational logic circuit
▪ The Boolean algebra expression for a given logic circuit can be
derived by systematically progressing from input to output on
the gates
▪ The three logic gates (AND, OR, and NOT) are logically complete
because any Boolean expression can be realized as a logic circuit
using only these three gates
Finding Boolean Expression of a Logic Circuit(Example 1)

A
A

NOT
D= A⋅(B +
B B+C AND
C)

C OR
Finding Boolean Expression of a Logic Circuit(Example 2)

OR

A A+
B
B
C=(A +B )⋅(A⋅B)
A A⋅B AND
⋅B
AND NOT
Constructing a Logic Circuit from a Boolean Expression
(Example 1)
Universal NAND Gate

• Nand gate is an universal gate, It is alone sufficient to implement


any Boolean expression

▪ To understand this, consider:

▪ Basic logic gates (AND, OR, and NOT) are logically


complete

▪ Sufficient to show that AND, OR, and NOT gates can be


implemented with NAND gates
Implementation of NOT, AND and OR Gates by NAND
Gates

A⋅A=A+A= A
A
(a) NOT gate implementation.

A ⋅B
A A ⋅B= A
⋅B

B (b) AND gate implementation.

(Continued on next slide)


Implementation of NOT, AND and OR Gates by
NAND Gates (Continued from previous slide..)

and OR Gates by

A⋅A
A =A A ⋅B = A + B = A +
B ⋅B B
B
=B
(c) OR gate implementation.
Method of Implementing a Boolean Expression with
Only NAND Gates

Step 1: From the given algebraic expression,


draw the logic diagram with AND, OR, and
NOT
both the (A) and complement
gates. Assume that inputs
normal available are
(A )
Step 2: Draw a second logic diagram with the equivalent
NAND logic substituted for each AND, OR, and NOT
gate
Step 3: all pairs of cascaded inverters
Remove from the as double inversion
diagramfunction.
logical does not performany
Also remove connected
single inverters
external inputs and complement to
corresponding input variable the
Implementing a Boolean Expression with Only
NAND Gates (Example)

Boolean Expression =
A ⋅ B + C ⋅( A + B
A A⋅B ⋅D )
A ⋅ B + C ⋅( A + B
B
B B⋅D ⋅D )
A +B⋅D
D

A C⋅(A +B⋅D)
C
(a) Step 1: AND/OR implementation
(Continued on next slide)
Implementing a Boolean Expression with Only NAND Gates
(Example) (Continued from previous slide..)

AND
OR
A A⋅B
1

5
B
AND OR
B B⋅D
2 A+B ⋅D
3

A ⋅B + C⋅(A+B⋅D)
D
A

AND

4
C
C⋅(A+B⋅D)
(b) Step 2: Substituting equivalent NAND functions
(Continued on next slide)
Implementing a Boolean Expression with Only NAND Gates
(Example) (Continued from previous slide..)
(

1
B 5 A ⋅B + C⋅(A
2
+B⋅D)
B D
3
A
4
C

(c) Step 3: NAND implementation.


Universal NOR Gate

▪ NOR gate is an universal gate, it is


alone sufficient to implement any Boolean
expression
▪ To understand this, consider:
▪ Basic logic gates (AND, OR, and NOT) are
logically complete
▪ Sufficient to show that AND, OR, and NOT
gates can be implemented with NOR gates
Implementation of NOT, OR and AND Gates by
NOR Gates

A+A=A⋅A=
A
A

(a) NOT gate implementation.

A A + A + B=A
B +B
B
(b) OR gate implementation.

(Continued on next slide)


Implementation of NOT, OR and AND Gates by NOR Gates
(Continued from previous slide..)

A A + A =A
A + B = A ⋅B = A
⋅B

B
B + B =B
(c) AND gate implementation.
Method of Implementing a Boolean Expression
with Only NOR Gates

Step 1: For the given algebraic expression, draw the logic

(
diagram with AND, OR, and NOT gates.
A
Assume normal (A) and complement
both thethat inputs are

)
available

Step 2: Draw a second logic diagram with equivalent NOR


logic substituted for each AND, OR, andNOT gate

Step 3: Remove all parts of cascaded


inverters from the diagram as double
inversion
logical function.doesAlsonot performany
remove connected
inverters single external complement to
inputs and
corresponding input variable the
Implementing a Boolean Expression with Only NOR Gates
(Examples)(Continued from previous slide..)

A ⋅B + C⋅( A +B⋅D)
Boolean Expression
=
A A⋅B
B
A ⋅B + C⋅(A
B B⋅D
A +B⋅D +B⋅D)
D

A C⋅(A +B⋅D)
C (a) Step 1: AND/OR implementation.

(Continued on next slide)


AND
A

A ⋅ B +(C⋅ A )
B OR
5 6
AND
+B⋅D
B B⋅D
2

D OR
AN
3 D
A
4

C C⋅ ( A +B⋅D)

A +B⋅D
(b) Step Substituting equivalent NOR functions.
2:
(Continued on next slide)
Implementing a Boolean Expression with Only NOR Gates
(Examples)(Continued from previous slide..)

A 1

B 5 6 A ⋅B + C⋅(A +B⋅D)
B 2

D 3

A 4

(c) Step 3: NOR implementation.


C
Exclusive-OR Function
A⊕B=A⋅B+A⋅
B
A B C = A ⊕B = A ⋅B+ A
⋅B
A ⊕ C = A ⊕B = A ⋅B+ A
B
⋅B

Also, (A ⊕B)⊕ C = A ⊕ (B ⊕ C) = A ⊕B
⊕C (Continued on next slide)
Exclusive-OR Function (Truth Table)
(Continued from previous slide..)

Inputs Output

A B C = A ⊕B

0 0 0

0 1 1

1 0 1

1 1 0
Steps in Designing Combinational Circuits

1. State the given problem completely and exactly


2. Interpret the problem and determine the available input
variables and required output variables
3. Assign a letter symbol to each input and output variables
4. Design the truth table that defines the required relations
between inputs and outputs
5. Obtain the simplified Boolean function for each output
6. Draw the logic circuit diagram to implement the Boolean
function
References

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha


Thank you

You might also like