0% found this document useful (0 votes)
11 views5 pages

Lesson 4

Lesson 4 covers the fundamentals of logic gates, including basic types (AND, OR, NOT) and their functions in digital circuits. It also introduces combinational logic gates (NAND, NOR) and highlights their practical applications in systems like alarms and traffic lights. Logic gates are essential components in integrated circuits, enabling complex operations in modern electronic devices.
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)
11 views5 pages

Lesson 4

Lesson 4 covers the fundamentals of logic gates, including basic types (AND, OR, NOT) and their functions in digital circuits. It also introduces combinational logic gates (NAND, NOR) and highlights their practical applications in systems like alarms and traffic lights. Logic gates are essential components in integrated circuits, enabling complex operations in modern electronic devices.
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/ 5

Lesson 4: Logic Gates and Boolean Functions

4.1 Introduction
In digital electronics, logic gates are used to perform logical operations on one
or more binary inputs to produce a single binary output. They are the building
blocks of digital circuits, including the Central Processing Unit (CPU) in
computers.
Every decision in a digital system is made through logical operations, and these
are implemented using logic gates. Examples of decision-making in everyday
life can include:
• A car alarm system that alerts when a door is open.
• A traffic light system that operates based on vehicle detection.

4.2 Basic Logic Gates


There are three basic types of logic gates:
1. AND Gate
2. OR Gate
3. NOT Gate

4.2.1 AND Gate


The AND gate performs a logical multiplication operation. The output is 1
(true) only if both inputs are 1. If either or both inputs are 0, the output is 0.
Real-world Example:
Imagine a door that requires two separate keys (inputs) to open:
• Both keys must be present (both inputs are 1) for the door to open (output
1).
• If either key is missing (input 0), the door remains locked (output 0).
Truth Table for AND Gate:
A B Q (A AND B)

ISURU M. SAMARANAYAKA (BSC.CYBER SECURITY) 1


0 0 0
0 1 0
1 0 0
1 1 1
Boolean Expression:
The Boolean expression for an AND gate is represented as A⋅BA \cdot BA⋅B.

4.2.2 OR Gate
The OR gate performs a logical addition operation. The output is 1 if at least
one of the inputs is 1. The output is 0 only if both inputs are 0.
Real-world Example:
Consider a bus with two doors. A passenger can exit through either the front or
the back door. If either door is open (1), the passenger can exit (output 1).
Truth Table for OR Gate:
A B Q (A OR B)
0 0 0
0 1 1
1 0 1
1 1 1
Boolean Expression:
The Boolean expression for an OR gate is represented as A+BA + BA+B.

4.2.3 NOT Gate


The NOT gate performs a logical inversion operation. It takes a single input
and produces the opposite output. If the input is 1, the output is 0, and if the
input is 0, the output is 1.
Real-world Example:

ISURU M. SAMARANAYAKA (BSC.CYBER SECURITY) 2


Imagine a system where a light turns on only when the switch is not pressed.
Pressing the switch (input 1) turns off the light (output 0), and releasing the
switch (input 0) turns it on (output 1).
Truth Table for NOT Gate:
A Q (NOT A)
0 1
1 0
Boolean Expression:
The Boolean expression for a NOT gate is represented as A‾\overline{A}A.

4.3 Combinational Logic Gates


By combining basic logic gates, we can create more complex combinational
logic gates. Two common types are the NAND gate and NOR gate, which are
widely used in digital circuits.

4.3.1 NAND Gate


The NAND gate is a combination of an AND gate followed by a NOT gate. The
output is 1 unless both inputs are 1, in which case the output is 0.
Truth Table for NAND Gate:
A B Q (A NAND B)
0 0 1
0 1 1
1 0 1
1 1 0
Boolean Expression:
The Boolean expression for a NAND gate is represented as A⋅B‾\overline{A
\cdot B}A⋅B.

4.3.2 NOR Gate

ISURU M. SAMARANAYAKA (BSC.CYBER SECURITY) 3


The NOR gate is a combination of an OR gate followed by a NOT gate. The
output is 1 only when both inputs are 0.
Truth Table for NOR Gate:
A B Q (A NOR B)
0 0 1
0 1 0
1 0 0
1 1 0
Boolean Expression:
The Boolean expression for a NOR gate is represented as A+B‾\overline{A +
B}A+B.

4.4 Practical Applications of Logic Gates


Logic gates are used in a wide variety of practical applications, including:
1. Home Alarm System: OR gates are used to activate alarms when any
sensor detects an intrusion.
2. Street Light Control: AND gates can be used to switch on lights only
when the environment is dark and during specific times.
3. Car Warning Systems: Combinations of AND, OR, and NOT gates are
used to alert drivers when doors are open, or seatbelts are unbuckled.

4.5 Integrated Circuits


Integrated Circuits (ICs) are tiny electronic circuits that contain combinations
of thousands or millions of transistors, diodes, and logic gates. These are used in
all modern electronic devices like computers, mobile phones, and appliances.
Example:
• A microprocessor is made up of millions of logic gates, allowing it to
perform complex calculations and process information at incredible
speeds.

ISURU M. SAMARANAYAKA (BSC.CYBER SECURITY) 4


Summary of Lesson 4
• Basic logic gates (AND, OR, NOT) are the building blocks of digital
circuits.
• Combinational logic gates (NAND, NOR) are derived by combining
basic gates to create more complex operations.
• Logic gates are essential for designing electronic circuits used in real-
world applications like alarms, traffic lights, and computer processors.

ISURU M. SAMARANAYAKA (BSC.CYBER SECURITY) 5

You might also like