0% found this document useful (0 votes)
7 views

Logic Gates

The document provides an overview of digital logic design, specifically focusing on various types of logic gates including AND, OR, NOT, NAND, NOR, XOR, and XNOR. Each gate's operation, truth table, and waveform inputs are discussed, along with the concept of universal logic gates. Additionally, the document includes conceptual questions related to logic gate applications in real-world scenarios.

Uploaded by

ah046810
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Logic Gates

The document provides an overview of digital logic design, specifically focusing on various types of logic gates including AND, OR, NOT, NAND, NOR, XOR, and XNOR. Each gate's operation, truth table, and waveform inputs are discussed, along with the concept of universal logic gates. Additionally, the document includes conceptual questions related to logic gate applications in real-world scenarios.

Uploaded by

ah046810
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Digital Logic Design

(ELE-205)

Logic Gates

Course Instructor: Engr. Abdul Moiz


Department of Biomedical Engineering
Email: [email protected]

Salim Habib University


Logic Gate

Logic: In digital electronics, the decision-making capability of gate circuits, in which


a HIGH represents a true statement and a LOW represents a false one.

Gate: A logic circuit that performs a basic logic operation such as AND or OR.

or combine we can say,

It is a physical device which performs logic operation one or more logical inputs, and
produce a single logical output.

Salim Habib University


Types of Logic Gates
The following types of logic gates are commonly used:

1. AND 2. OR 3. NOT 4. NOR 5. NAND 6. XOR 7. XNOR

1. AND Gate
The AND gate is one of the basic gates that can be combined to form any logic
function. An AND gate can have two or more inputs and it performs a logical
multiplication

Standard logic symbol and Expression

Salim Habib University


Operation of an AND Gate
An AND gate produces a HIGH output only when all of the inputs are HIGH. When
any of the inputs is LOW, the output is LOW
Below attached figure illustrates a 2-input AND gate with all four possibilities of
input combinations and the resulting output for each.

Salim Habib University


AND Gate Truth Table
The logical operation of a gate can be expressed with a
truth table that lists all input combinations with the
corresponding outputs.

The total number of possible combinations of binary


inputs to a gate is determined by the following
formula:

where N is the number of possible input combinations


and n is the number of input variables. To illustrate,

Salim Habib University


Task: Determine the total number of possible input combinations for a 3-input AND gate.

AND Gate Operation with Waveform Inputs


A diagram of input and output waveforms showing time relationships is called a
timing diagram.

Salim Habib University


Task: If two waveforms, A and B, are applied to the AND gate inputs, what is the resulting
output waveform?

2. OR Gate

The OR gate is another of the basic gates. An OR gate can have two or
more inputs and it performs a logical addition.

Standard logic symbol and Expression

Salim Habib University


Operation of an OR Gate
An OR gate produces a HIGH on the output when any of the inputs is HIGH. The
output is LOW only when all of the inputs are LOW

Below attached figure illustrates the operation for a 2-input OR gate for all four
possible input combinations.

Salim Habib University


OR Gate Truth Table

OR Gate Operation with Waveform Inputs

Salim Habib University


Task: If two waveforms, A and B, are applied to the OR gate inputs, what is the resulting
output waveform?

3. NOT Gate
The inverter (NOT circuit) performs the operation called inversion or
complementation. The inverter changes one logic level to the opposite level.

Standard logic symbol and Expression

Salim Habib University


NOT Gate Truth Table
When a HIGH level is applied to an inverter
input, a LOW level will appear on its output.
When a LOW level is applied to its input, a
HIGH will appear on its output.

NOT Gate Operation with Waveform Inputs

Salim Habib University


4. 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 inverter
operations.
The term NAND is a contraction of NOT-AND and implies an AND function with a
complemented (inverted) output.

Standard logic symbol and Expression

Salim Habib University


Operation of a NAND Gate
A NAND gate produces a LOW output only when all the inputs are HIGH. When any
of the inputs is LOW, the output will be HIGH.

Below attached figure illustrates the operation of a 2-input NAND gate for all four
input combinations.

Salim Habib University


NAND Gate Truth Table

NAND Gate Operation with Waveform Inputs

Salim Habib University


Task: Show the output waveform for the 3-input NAND gate with its proper time
relationship to the inputs.

5. NOR Gate
The NOR gate, like the NAND gate, is a useful logic element because it can also be
used as a universal gate. The term NOR is a contraction of NOT-OR and implies an
OR function with an inverted (complemented) output.
Standard logic symbol and Expression

Salim Habib University


Operation of a NOR Gate
A NOR gate produces a LOW output when any of its inputs is HIGH. Only when all
of its inputs are LOW is the output HIGH

Below attached figure illustrates the operation of a 2-input NOR gate for all four
possible input combinations.

Salim Habib University


NOR Gate Truth Table

NOR Gate Operation with Waveform Inputs


Task: If the two waveforms shown in Figure are applied to a NOR gate, what is the
resulting output waveform?

Salim Habib University


6. XOR Gate
The exclusive-OR (XOR for short) gate performs modulo-2 addition. The output of
an exclusive-OR gate is HIGH only when the two inputs are at opposite logic levels.

Standard logic symbol and Expression

Operation of a XOR Gate

Salim Habib University


XOR Gate Truth Table

XOR Gate Operation with Waveform Inputs

Salim Habib University


7. XNOR Gate
The bubble on the output of the XNOR symbol indicates that its output is opposite
that of the XOR gate

Standard logic symbol and Expression

Operation of a XNOR Gate

Salim Habib University


XNOR Gate Truth Table

XNOR Gate Operation with Waveform Inputs

Salim Habib University


Salim Habib University
Universal Logic gates

A universal logic gate is a logic gate that can implement any possible Boolean function, without the need for
any other type of logic gate.

There are two main types of universal logic gates:


1. NAND Gate
2. NOR Gate

Salim Habib University


logic gate-based conceptual questions (by using truth table)

1. A system has two power sources. It will work only if both are ON. How can you check if one of
the power sources fails?
(O represents OFF, 1 represents ON).
2. A security system has two sensors: one at the front door and another at the back door. The
alarm should sound if either door is opened. How would you design this system using logic gates?
(O represents closed, 1 represents open)
3. A microcontroller sends a high (1) signal to activate a motor. However, the motor driver requires
a low (O) signal to turn on. How can you ensure correct operation?
4. A reset mechanism should activate when neither of two system components are functioning.
How can you achieve this using a logic gate?
(O represents not functioning, 1 represents functioning)
5. A security system has two sensors. The alarm will trigger if at least one of the sensors is OFF.
(O represents OFF, 1 represents ON)

Salim Habib University


6. A system has two switches. The output light will turn ON only if one of the switches is ON, but not
both. How can you determine if the system is working correctly when both switches are in different
states?
(O represents OFF, 1 represents ON)

7. A system has two switches. The output light will turn ON only if both switches are in the same
state (either both ON or both OFF). How can you verify if the system is functioning properly when
both switches are in the same state?
(O represents OFF, 1 represents ON)

Salim Habib University

You might also like