Logic Gates & Truth Tables - Digital Logic - Computer Science Engineering

Introduction

These are important digital devices that are mainly based on the Boolean function. Logic gates are used to carry out logical operations on single or multiple binary inputs and give one binary output. In simple terms, logic gates are the electronic circuits in a digital system.

Types of Basic Logic Gates

There are several basic logic gates used in performing operations in digital systems. The common ones are;

  • OR Gate
  • AND Gate
  • NOT Gate
  • XOR Gate

Additionally, these gates can also be found in a combination of one or two. Therefore we get other gates such as NAND Gate, NOR Gate, EXOR Gate, and EXNOR Gate.

OR Gate
In an OR gate, the output of an OR gate attains state 1 if one or more inputs attain state 1.

Types of Basic Logic Gates

The Boolean expression of the OR gate is Y = A + B, read as Y equals A 'OR' B.

The truth table of a two-input OR basic gate is given as;

Types of Basic Logic Gates

AND Gate
In the AND gate, the output of an AND gate attains state 1 if and only if all the inputs are in state 1.

Types of Basic Logic Gates

The Boolean expression of AND gate is Y = A.B

The truth table of a two-input AND basic gate is given as;

Types of Basic Logic Gates

NOT Gate
In a NOT gate, the output of a NOT gate attains state 1 if and only if the input does not attain state 1.

Types of Basic Logic Gates

The Boolean expression is:

Types of Basic Logic Gates

It is read as Y equals NOT A.

The truth table of NOT gate is as follows;

Types of Basic Logic Gates

When connected in various combinations, the three gates (OR, AND and NOT) give us basic logic gates such as NAND, and NOR gates, which are the universal building blocks of digital circuits.

NAND Gate
This basic logic gate is the combination of AND and NOT gates.

Types of Basic Logic Gates

The Boolean expression of the NAND gate is:

Types of Basic Logic Gates

The truth table of a NAND gate is given as;
Types of Basic Logic Gates

NOR Gate
This gate is the combination of OR and NOT gate.

Types of Basic Logic Gates

The Boolean expression of NOR gate is:
Types of Basic Logic Gates

The truth table of a NOR gate is as follows;

Types of Basic Logic Gates

Exclusive-OR gate (XOR Gate)
In an XOR gate, the output of a two-input XOR gate attains state 1 if one adds only input attains state 1.

Types of Basic Logic Gates

The Boolean expression of the XOR gate is:
Types of Basic Logic Gates
The truth table of an XOR gate is;
Types of Basic Logic Gates

Exclusive-NOR Gate (XNOR Gate)
In the XNOR gate, the output is in state 1 when both inputs are the same, that is, both 0 or both 1.

Types of Basic Logic Gates

The Boolean expression of the XNOR gate

Types of Basic Logic Gates

The truth table of an XNOR gate is given below;

Types of Basic Logic Gates

Application Of Logic Gates

Logic gates have a lot of applications, but they are mainly based upon their mode of operations or their truth table. Basic logic gates are often found in circuits such as safety thermostats, push-button locks, automatic watering systems, light-activated burglar alarms and many other electronic devices.

One of the primary benefits is that basic logic gates can be used in various combinations if the operations are advanced. Besides, there is no limit to the number of gates that can be used in a single device. However, it can be restricted due to the given physical space in the device. In digital integrated circuits (ICs), we will find an array of the logic gate area unit.

De Morgan's Theorem

First theorem - It states that the NAND gate is equivalent to a bubbled OR gate.
Application Of Logic Gates

Second theorem - It states that the NOR gate is equivalent to a bubbled AND gate.

Application Of Logic Gates

Important Conversions

(1) The 'NAND' gate: From 'AND' and 'NOT' gate

Application Of Logic Gates

Boolean expression and truth table:

Application Of Logic Gates

(2) The 'NOR' gate: From 'OR' and 'NOT' gate

Application Of Logic Gates

Boolean expression and truth table:
Application Of Logic Gates

(3) The 'XOR' gate: From 'NOT', 'AND' and  'OR' gate.
The logic gate, which gives a high output (i.e., 1) if either input A or input B but not both are high (i.e. 1), is called the exclusive OR gate or the XOR gate. It may be noted that if both the inputs of the XOR gate are high, then the output is low (i.e., 0).

Application Of Logic Gates

Application Of Logic Gates

Boolean expression and truth table:
Application Of Logic Gates

Application Of Logic Gates

(4) The Exclusive nor (XNOR) gate XOR + NOT
Application Of Logic Gates

Boolean expression:
Application Of Logic Gates

Application Of Logic Gates

The document Logic Gates & Truth Tables is a part of the Computer Science Engineering (CSE) Course Digital Logic.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)

FAQs on Logic Gates & Truth Tables

1. What's the difference between AND, OR, and NOT logic gates and how do truth tables show this?
Ans. AND gates output 1 only when both inputs are 1; OR gates output 1 when at least one input is 1; NOT gates simply invert the input. Truth tables systematically display all possible input combinations and their corresponding outputs, making it easy to compare how each logic gate behaves differently under identical conditions.
2. Why do some students get confused between XOR and XNOR gates in digital logic?
Ans. XOR (exclusive OR) outputs 1 when inputs differ-one is 0, the other is 1-while XNOR outputs 1 when inputs match (both 0 or both 1). The truth table clarifies this: XOR shows opposite outputs, XNOR shows matching outputs. Students often mix them because both involve comparing two inputs, but their logic is completely reversed.
3. How do I use truth tables to design digital logic circuits for exam problems?
Ans. Start by listing all input combinations, then determine the required output for each. Create a truth table showing these input-output relationships, then use Boolean algebra or Karnaugh maps to derive the minimal logic expression. This systematic approach converts any circuit requirement into implementable gates. Practice with flashcards and mind maps available on EduRev to strengthen pattern recognition.
4. What does it mean when a logic gate has a bubble on its output in circuit diagrams?
Ans. A bubble represents a NOT operation or inversion at that output. NAND gates are AND gates with a bubble (inverted output), and NOR gates are OR gates with inverted output. The bubble essentially negates the result, so NAND outputs 0 only when both inputs are 1-opposite of AND's truth table behavior.
5. Can I solve any digital logic circuit problem just by reading the truth table correctly?
Ans. Yes, truth tables provide complete information about circuit behaviour under all conditions. By examining which input combinations produce 1 outputs, you can identify required gates and connections. However, simplifying circuits using Boolean algebra makes implementation efficient. Refer to detailed MCQ tests and worksheets on EduRev to practise converting truth tables into actual gate designs.
Explore Courses for Computer Science Engineering (CSE) exam
Get EduRev Notes directly in your Google search
Related Searches
pdf , shortcuts and tricks, Semester Notes, Summary, practice quizzes, MCQs, Objective type Questions, Logic Gates & Truth Tables, video lectures, Free, past year papers, ppt, Previous Year Questions with Solutions, Viva Questions, Logic Gates & Truth Tables, Important questions, study material, Sample Paper, mock tests for examination, Logic Gates & Truth Tables, Exam, Extra Questions;