# 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.

Truth table of NOR gate

## Some More Logic Gates

1. XOR: XOR or Ex-OR gate is a special type of gate. It can be used in the half adder, full adder, and subtractor. The exclusive-OR gate is abbreviated as EX-OR gate or sometimes as X-OR gate. For like inputs, the out is 0, and for unlike inputs the out is 1.

Truth table of XOR gate

2. XNOR: XNOR gate is a special type of gate. It can be used in the half adder, full adder, and subtractor. The exclusive-NOR gate is abbreviated as EX-NOR gate or sometimes as X-NOR gate.