# Basic Logic Gates – Definition, Types, Boolean Function, and Truth Table

In digital electronics, basic logic gates are the important components of all digital devices and systems. A logic gate is a digital circuit whose operation is based on the Boolean function. Thus, logic gates are used for performing different logical operations on binary inputs to produce a binary output. Therefore, we can simply state that logic gates are the basic building blocks of digital devices and systems.

All digital systems like computers are able to perform very complex logic operations, and these operation are performed by the interconnected system of basic logic gates. This interconnection of logic gates to perform a variety of logical operations is called logic design.

Basically, the logic gates are the electronic circuits because they are made up of a number of electronic devices and components. Logic gates are designed in a wide variety of forms. Practically, they are embedded in LSICs (large scale integrated circuits) and VLSICs (very large scale integrated circuits) along with several other devices. Each gate is designed to perform a specific logic operation. Input and outputs of logic gates can occur only in two states, and these two states are termed as high (1) and low (0), or true and false, on and off.

The operation of a logic gate is determined with the help of a table which lists all the combinations of input variables and the corresponding outputs. This table is called a truth table. The truth table shows how the output of the logic gate responds to various combinations of logic states at the inputs.

In this article, we shall learn the different types of basic logic gates with their Boolean function and truth table.

## Types of Basic Logic Gates

The following three are considered as basic logic gates −

• AND Gate
• OR Gate
• NOT Gate

Let's discuss in detail about these three basic logic gates.

## The AND Gate

The AND gate is a basic logic gate which may take two or more inputs and produces only one output. For the AND gate, the output is high (1), when all of its inputs are high (1). If any of inputs of the AND gate is low (0), the output of this gate is low (0). Therefore, the AND gate may be defined as a digital device whose output is high (1) only if all its inputs are 1. Thus, the AND, sometimes, also referred as an all or nothing gate. The symbol used for representing the AND operation is '.', or we use no symbol at all.

The Boolean expression or function of the AND gate is,

$$\mathrm{Y=A\cdot B}$$

Where, A and B are inputs and Y is the output of the AND gate

The circuit symbol of the AND gate is shown in Figure -1.

## Truth Table of AND Gate

The truth table of a two input AND gate is given below −

Inputs Output
A B Y = AB
0 0 0
0 1 0
1 0 0
1 1 1

## The OR Gate

An OR gate is an elementary logic gate which may have two or more inputs but only one output. The output of the OR gate is in the logic 1 state, even if one of its inputs is in the logic 1 state. The output of the OR gate is in the logic 0 state, only when all its inputs are in logic 0 state.

Therefore, an OR gate is a digital logic device whose output is 1, even if one of its inputs is 1. Hence, an OR gate may also called as any or all gate. The symbol used to represent the OR operation is '+'. Thus, the Boolean function of the OR gate is,

$$\mathrm{Y=A+B}$$

Where, A and B are inputs and Y is the output.

The logic symbol of a two input OR gate is shown in Figure-2

Truth Table of OR Gate

The following table shows the truth table of a two input OR gate −

Inputs Output
A B Y = A + B
0 0 0
0 1 1
1 0 1
1 1 1

## The NOT Gate

A NOT gate is an elementary logic gate which has only one input and one output. The NOT gate is a digital logic device whose output is always the complement of its input. Therefore, it is also called as an inverter.

The output of the NOT gate is in the logic 1 state when its input is in the logic 0 state, and in the logic 0 state when its input is in the logic 1 state. The symbol used to represent the NOT operation is a bar (-). Therefore, the Boolean function of a NOT gate is

$$\mathrm{Y=\bar{A}=A^{'}}$$

Where, A is the input and Y is the output of the NOT gate.

The circuit symbol of a NOT gate is shown in Figure-3.

### Truth Table of NOT Gate

The following is the truth table of the NOT gate −

Input Output
A Y = A'
0 1
1 0

## Conclusion

In this article, we discussed three basic types of gates: AND, OR, and NOT. These logic gates are fundamental blocks of all digital systems. These are called logic gates because they have ability to make decisions. From the above discussed it is clear that the AND gate performs the Boolean multiplication, the OR gate performs the Boolean addition and the NOT gate performs the Boolean inversion.