# Basic Logic Gates with Truth Tables Full Tutorial - CodeTextPro

## Basic logic gates

A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment, every terminal is in one of the two binary conditions low (0) or high (1), represented by different voltage levels. In most logic gates, the low state is approximately zero volts (0 V), while the high state is approximately five volts positive (+5 V).

Types of Basic Logic Gate
There are seven basic logic gates:
 AND
 OR
 XOR
 NOT
 NAND
 NOR
 XNOR

AND Gate: The output of AND gate is "true" when both inputs are "true." Otherwise, the output is "false”.

OR Gate: The output of OR gate is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false."

XOR Gate: The XOR (exclusive-OR) gate acts in the same way as the logical "either/or." The output is "true" if either, but not both, of the inputs are "true." The output is "false" if both inputs are "false" or if both inputs are "true." Another way of looking at this circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same.

NOT Gate: It has only one input. It reverses the logic state of the input.

NAND Gate: The NAND gate operates as an AND gate followed by a NOT gate. It acts in the manner of the logical operation "and" followed by negation. The output is "false" if both inputs are "true." Otherwise, the output is "true."

NOR Gate: The NOR gate is a combination OR gate followed by a NOT gate. Its output is "true" if both inputs are "false." Otherwise, the output is "false."

XNOR Gate: The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an inverter. Its output is "true" if the inputs are the same and "false" if the inputs are different.

Using combinations of logic gates, complex circuit can be designed. In theory, there is no limit to the number of gates that can be arrayed together in a single device. But in practice, there is a limit to the number of gates that can be packed into a given physical space.

What are basic and universal logic gates?
NAND gate and NOR gate are called universal gates since they can be used to implement any Boolean function using any other type of gate. Both NAND and NOR gates are the basic gates used in all digital logic integrated circuits.

What are the three basic logic gates?
All digital systems can be constructed by only three basic logic gates. These basic gates are called the AND gate, OR gate and NOT gate.

Which is called universal gate?
NAND is the universal gate. Universal gates can implement any Boolean function without using any other type of gate.

Why logic gates are used?
Computers need a way to manipulate those 1s and 0s, so that they can eventually do more complicated operations like calculating the 50th digit of π. Computers use logic gates to transform the 1s and 0s from input wires. A logic gate accepts inputs and then outputs a result based on their state.

What is difference between basic gate and universal gate?
A universal gate is a logic gate which can implement any Boolean function without the need to use any other type of logic gate. The NOR gate and NAND gate are universal gates. This means that you can create any logical Boolean expression using only NOR gates or only NAND gates.