PhysicsTopic 17

5054 · Topic 17 of 25

Digital Electronics (Logic Gates)

Explore the building blocks of digital circuits and how they process binary information.

~5Minutes
8Key points
5Questions
All Physics topics

Study path

Learn it, recall it, then prove it

01 · Understand

Read the explanation and work through each example.

02 · Recall

Close the notes and explain the main idea yourself.

03 · Practise

Attempt the quiz, then revisit only missed concepts.

Digital Electronics (Logic Gates) concept map
Start here: a visual map of the ideas you will connect in this lesson.

Introduction to Digital Electronics

In the world of electronics, we encounter two primary types of signals: analogue and digital. An analogue signal is continuous and can have an infinite number of values within a range, like the sound waves from a human voice or the dimming of a light bulb. In contrast, a digital signal is discrete, meaning it can only have specific, separate values. In the context of this topic, we focus on binary digital signals, which have only two possible states: HIGH (represented by the number 1) or LOW (represented by the number 0). These two states can also be described as 'ON' or 'OFF', or 'True' or 'False'. All modern computing, from smartphones to supercomputers, is built upon the simple yet powerful principle of processing these binary ones and zeros.

What are Logic Gates?

Logic gates are the fundamental building blocks of digital circuits. They are simple electronic circuits that take one or more binary inputs and produce a single binary output. The output of a logic gate is determined by a specific logical rule or function. By combining these gates in various configurations, we can build complex circuits that perform calculations, store data, and make decisions. We will study five fundamental logic gates: NOT, AND, OR, NAND, and NOR.

Basic Logic Gates

1. The NOT Gate (Inverter)

The NOT gate is the simplest type of logic gate. It has only one input and one output. Its function is to invert the input signal. If the input is HIGH (1), the output will be LOW (0), and if the input is LOW (0), the output will be HIGH (1).

  • Symbol: A triangle pointing to the right, with a small circle (a 'bubble') at its tip where the output line is drawn.
  • Boolean Expression: The logical operation is written as Q = NOT A or Q = Ā.
  • Truth Table: A truth table is a table that shows the output of a logic gate for every possible combination of inputs.
Input AOutput Q
01
10

2. The AND Gate

The AND gate typically has two or more inputs and one output. The output of an AND gate is HIGH (1) only if all of its inputs are HIGH (1). If any input is LOW (0), the output will be LOW (0).

  • Symbol: A shape resembling the letter 'D'.
  • Boolean Expression: Q = A AND B or Q = A · B.
  • Truth Table (for 2 inputs):
Input AInput BOutput Q
000
010
100
111

3. The OR Gate

The OR gate also has two or more inputs and one output. The output of an OR gate is HIGH (1) if at least one of its inputs is HIGH (1). The output is LOW (0) only when all inputs are LOW (0).

  • Symbol: A curved, shield-like shape with a pointed tip on the output side.
  • Boolean Expression: Q = A OR B or Q = A + B.
  • Truth Table (for 2 inputs):
Input AInput BOutput Q
000
011
101
111

Combination (Universal) Logic Gates

4. The NAND Gate (NOT-AND)

A NAND gate is a combination of an AND gate followed by a NOT gate. Its output is the opposite of an AND gate. The output is LOW (0) only when all inputs are HIGH (1). In all other cases, the output is HIGH (1).

  • Symbol: The same 'D' shape as an AND gate, but with a small circle at the output.
  • Boolean Expression: Q = A NAND B or Q = A · B.
  • Truth Table (for 2 inputs):
Input AInput BOutput Q
001
011
101
110

5. The NOR Gate (NOT-OR)

A NOR gate is a combination of an OR gate followed by a NOT gate. Its output is the opposite of an OR gate. The output is HIGH (1) only when all its inputs are LOW (0).

  • Symbol: The same curved shape as an OR gate, but with a small circle at the output.
  • Boolean Expression: Q = A NOR B or Q = A + B.
  • Truth Table (for 2 inputs):
Input AInput BOutput Q
001
010
100
110

These five gates form the foundation of all digital logic. By connecting them together, engineers create the complex microchips found in every digital device, enabling them to perform tasks ranging from simple arithmetic to running complex software.

Digital Electronics (Logic Gates) revision summary
Revision check: explain each link without reopening the lesson, then repair the first gap.

Quick revision infographic

Physics · Quick revision

Digital Electronics (Logic Gates)

Key concepts

  1. 01Digital electronics use **binary** signals, representing data as one of two states: 1 (HIGH) or 0 (LOW).
  2. 02A **logic gate** is a basic electronic circuit that performs a logical operation on binary inputs to produce a single binary output.
  3. 03A **truth table** systematically lists all possible input combinations for a gate and shows the corresponding output for each.
  4. 04The **NOT** gate has one input and inverts it (0 becomes 1, 1 becomes 0).
  5. 05The **AND** gate's output is 1 only if all its inputs are 1.
  6. 06The **OR** gate's output is 1 if one or more of its inputs is 1.
Logic Gates in Uninterruptible Power Supplies (UPS)

In many homes and offices across Pakistan, a UPS is essential due to frequent power outages ('load-shedding'). A simple logic circuit within a UPS decides when to switch from mains power (WAPDA) to battery power. An **AND gate** can be used for this. **Input A** can represent the mains power status (1 = available, 0 = unavailable). **Input B** can be a switch that indicates the UPS is turned on (1 = ON, 0 = OFF). The circuit to charge the battery (Output Q) will only be active (Q=1) when mains power is available **AND** the UPS is switched on. This simple logic ensures the battery doesn't try to charge when there is no electricity, demonstrating a practical, everyday application of logic gates in the Pakistani context.

SeekhoAsaan.com · Free revisionDigital Electronics (Logic Gates)

Test your knowledge.

5 explained questions. Har answer ke baad reasoning foran milegi.

3 Beginner2 Intermediate
Start 5-question quiz