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.
what are logic gates
AND Gate

Truth Table of AND gate:

ABA AND B  
000  
010  
100  
111  
Truth Table – AND

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

what are logic gates
OR Gate

Truth Table of OR gate

ABA OR B  
000  
011  
101  
111  
Truth Table – OR

3. NOT: It reverses the input.

what are logic gates
NOT Gate

Truth table of NOT gate

ANOT A  
01  
10  
Truth Table – NOT

Combinational Logic Gates

  1. NAND: It is a combination of NOT and AND gates.
what are logic gates
NAND Gate

Truth table of NAND gate

ABA AND B  NOT(A AND B) / A NAND B
000  1
010  1
100  1
111  0
Truth Table – NAND

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

what are logic gates
NOR Gate

Truth table of NOR gate

ABA OR B  NOT(A OR B) / A NOR B
000  1
011  0
101  0
111  0
Truth Table – NOR

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.
what are logic gates
XOR Gate

Truth table of XOR gate

ABA XOR B  
000  
011  
101  
110  
Truth Table – XOR

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.

what are logic gates
XNOR Gate
ABA XNOR B  
001  
010  
100  
111  
Truth Table – XNOR

Leave a Comment