# Logic Gates Explained to Kids

This post is also available in: हिन्दी (Hindi) العربية (Arabic)

In our day-to-day life, we use the decimal number system. But calculators and computers store numbers (0 – 9) as long strings of zeros and ones in a form called binary code. Operations are performed on these numbers using Logic Gates.

But how can computers add, subtract, multiply, and divide using nothing but electric circuits? All these operations are performed by Logic Gates. Let’s find out what are Logic Gates.

## What are Logic Gates?

Calculators and computers do this using clever electronic circuits called logic gates.

Logic gates are the basic building blocks of any digital system. It is an electronic circuit having one or more than one input and only one output. The relationship between the input and the output is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate, NOT gate, etc.

## Basic Logic Gates

There are three types of basic logic gates:

1. AND: It gives an output 1, only if both the inputs are 1.

Truth Table of AND gate:

2. OR: It gives an output 1 if any of the inputs is 1.

Truth Table of OR gate

3. NOT: It reverses the input.

Truth table of NOT gate

## Combinational Logic Gates

1. NAND: It is a combination of NOT and AND gates.

Truth table of NAND gate

2. NOR: It is a combination of NOT and OR gates.