# Gates

Digits 0 and 1, have a numerical significance on our lives. The numbers having 0 are valued when the zeros are to the right rather than to the left. E.g: number 100 is valued than number 001. But in smart digital devices, it has logical significance. The digits 1 and 0 are valued as high and low numbers. While these digits are valued as the output, the decision making element is called the Logic Gates.

These are the building blocks of the digital system. Logic gates are an implementation of an electronic device to have a logical operation to be performed on one or more binary inputs to produce a single binary output.

For example, the input of 0 and 1 will have a single output 1 or 0 depending on the type of logic gate applied to these inputs. The output of the digital logic gates will be determined in two ways:

• The type of logic gate
• The nature of the input variable

## Truth tablesโ

The truth table is a mathematical table that displays the input variable and output variables determined by the logic gates. The truth table is made of rows and columns.

• Each input variable represents one column and the last column in known for the output.
• Each row represents the possible combinations of input variables and the outcome of these combinations.

The output of the table depends on the logic gate, rather it just displays the input and output for the logic gates. The below truth table displays the input and output of variables. Here the output for the single variables is displayed. The output depends on the logic gates used to create the table.

## Different logic gatesโ

There are numerous gates available. Each has a specific symbol and a defined behavior to determine the output. There are two major classifications in Gates:

## Basic gatesโ

These are fundamental logic operations for which all the complex functions can be derived. These are AND, OR and NOT.

### AND Gateโ

In AND logical gate if both the inputs are switched ON or 1 then the output is 1. The below diagram shows the three-way gate logic can work.

### OR Gateโ

In OR the output is 1, when either of the input is 1. However, when both inputs are 0s, the output is 0.

### NOT Gateโ

Unlike other basic gates, NOT gate has one input and one output. The output is inverse of the input.