ITKokka
Lesson 4 Ā· Note 2

Basic Logic Gates

šŸ“Œ The Short Note

Download

šŸ“– Explanation

Basic Logic Gates

Logic gates are fundamental building blocks of digital electronic systems. They work with binary values, 0 and 1, and perform logical operations on one or more inputs to produce a binary output.

This note covers the three basic logic gates — AND, OR, and NOT — including their symbols, Boolean expressions, truth tables, and simple real-life examples.

What Are Logic Gates?

A logic gate is an electronic circuit that performs a logical operation on binary inputs and produces a binary output.

The two binary values are:

  • 0 – represents OFF or no signal
  • 1 – represents ON or a signal

A logic gate receives one or more inputs and produces an output according to a specific logical rule.

Binary Inputs
      ↓
   Logic Gate
      ↓
Binary Output
Example: Basic decision-making

An electronic system can receive signals from switches or sensors. A logic gate processes those signals according to its logical rule and produces an output such as turning a device ON or OFF.

Key Idea: Logic gates operate on binary values, 0 and 1, and produce binary outputs based on logical rules.

The Three Basic Logic Gates

The three fundamental logic gates are:

  1. AND gate
  2. OR gate
  3. NOT gate

Other logic gates can be constructed by combining basic logical operations.

AND Gate

An AND gate produces an output of 1 only when all inputs are 1.

For two inputs, A and B, the Boolean expression is:

Q = A Ā· B

The dot Ā· represents the AND operation.

AND Gate Truth Table

ABQ = A Ā· B
000
010
100
111

The output becomes 1 only when both inputs are 1.

Example: Two switches controlling a light

Imagine two switches connected so that both switches must be ON before a light turns on.

Switch A = 1
     AND
Switch B = 1
     ↓
Light = 1

If either switch is OFF, the output is 0.

Remember: AND means all conditions must be true.

AND Gate with Three Inputs

An AND gate can have more than two inputs.

For three inputs, A, B, and C:

Q = A Ā· B Ā· C

The output is 1 only when A, B, and C are all 1.

Truth Table

ABCQ
0000
0010
0100
0110
1000
1010
1100
1111

For n binary inputs, the number of possible input combinations is:

2ⁿ

Therefore, three inputs have:

2³ = 8

possible input combinations.

OR Gate

An OR gate produces an output of 1 when at least one input is 1.

For two inputs:

Q = A + B

The + symbol represents the OR operation in Boolean algebra.

OR Gate Truth Table

ABQ = A + B
000
011
101
111

The only situation that produces an output of 0 is when both inputs are 0.

Example: Light controlled by two switches

Suppose a light should turn on when either one of two switches is ON.

Switch A = 1
     OR
Switch B = 0
     ↓
Light = 1

The light remains ON because at least one input is 1.

Example: Door alarm

A door alarm could be designed so that it activates when any one of several sensors detects a problem. This represents the basic idea of an OR operation: at least one required condition is true.

Remember: OR means at least one condition must be true.

NOT Gate

A NOT gate has one input and produces the opposite or complement of that input.

If the input is 0, the output is 1.

If the input is 1, the output is 0.

The Boolean expression can be written as:

Q = AĢ…

This means NOT A.

NOT Gate Truth Table

AQ
01
10

Unlike AND and OR gates, the NOT gate normally has one input.

Example: Opposite output

If a system is designed so that the output must be the opposite of the input:

Input = 0
   ↓
 NOT
   ↓
Output = 1

Similarly:

Input = 1
   ↓
 NOT
   ↓
Output = 0

Remember: NOT reverses the binary value.

Comparing AND, OR and NOT Gates

Logic GateMain RuleNumber of InputsBoolean Expression
ANDOutput is 1 when all inputs are 12 or moreQ = A Ā· B
OROutput is 1 when at least one input is 12 or moreQ = A + B
NOTOutput is the opposite of the input1Q = AĢ…

A useful way to remember them is:

AND → ALL
OR  → AT LEAST ONE
NOT → OPPOSITE

Boolean Expressions

Logic gates can be represented using Boolean expressions. These expressions describe the logical relationship between the inputs and the output.

The basic expressions are:

  • AND: Q = A Ā· B
  • OR: Q = A + B
  • NOT: Q = AĢ…
Example: AND expression

For:

Q = A Ā· B

the output Q becomes 1 only when both A and B are 1.

Truth Tables

A truth table shows all possible combinations of inputs and the corresponding output of a logic gate.

For two binary inputs, there are:

2² = 4

possible combinations.

For three binary inputs:

2³ = 8

possible combinations.

Truth tables are useful for checking how a logic gate behaves for every possible input combination.

Key Idea: A truth table shows every possible combination of binary inputs and the corresponding output.

How Logic Gates Make Decisions

Logic gates allow electronic systems to make decisions automatically according to predefined logical conditions.

The general process is:

Input signals
↓
Logical operation
↓
Output decision

An AND gate can be used when all required conditions must be satisfied.

An OR gate can be used when any one of several conditions should activate an output.

A NOT gate can be used when the required output is the opposite of the input.

Applications of Logic Gates

Logic gates are used as building blocks in many digital systems, including:

  • Computers
  • Calculators
  • Digital control systems
  • Electronic devices
  • Automatic decision-making circuits

Complex digital circuits can be created by combining multiple logic gates.

Exam-Focused Points

Key Idea: An AND gate gives 1 only when all inputs are 1.

Key Idea: An OR gate gives 1 when at least one input is 1.

Key Idea: A NOT gate gives the complement of its input — 0 becomes 1, and 1 becomes 0.

Quick Revision

  • AND → all inputs must be 1
  • OR → at least one input must be 1
  • NOT → gives the opposite output
  • Logic gates work with binary values 0 and 1.
  • A truth table shows possible input combinations and their outputs.
  • For n binary inputs, there are 2ⁿ possible input combinations.

Summary

Logic gates are basic components of digital electronic systems. They use binary inputs and produce binary outputs according to specific logical rules.

The three basic gates are AND, OR, and NOT. The AND gate requires all inputs to be 1, the OR gate requires at least one input to be 1, and the NOT gate reverses the input value.

Understanding these gates, their truth tables, symbols, and Boolean expressions provides a foundation for studying more complex digital logic circuits.

Share:
← Logic Gates IntroductionCombinational Logic Gates →