Lesson 4
Lesson 4
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.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.