# Easy Tricks to remember the Truth Table of Logic Gates

#### Bybarby

Jul 7, 2020

Hey guys! In this blog, I have come up with a few tricks to remember the truth tables of all the logic gates so that you do not have to keep on memorizing them repeatedly.

Before we start just remember:
TRUE = 1
FALSE = 0

Logic gates truth table is used to represent the boolean expression of a logic gate function. It shows every possible input combination with the resulting output.

## Logic gates truth table:

### 1. AND Gate:

Trick 1:
It is very similar to arithmetic multiplication.

0 * 0 = 0
0 * 1 = 0
1 * 0 = 0
1 * 1 = 1

Trick 2:
If you find BOTH the inputs as ‘1’ or ‘HIGH’ or ‘TRUE’ only then the output is ‘1’ else ‘0’.

### 2. OR Gate:

Trick 1:
It is very similar to arithmetic addition.

0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 1 (Here, 1 + 1 = 2 but as there is no logic 2 in Boolean so we have to consider it as ‘1’ or ‘TRUE’)

Trick 2:
If you find BOTH the inputs as ‘0’ or ‘LOW’ or ‘FALSE’ only then the output is ‘0’ else ‘1’.

### 3. NOT Gate:

Trick 1:
If the input is ‘0’ the output will be ‘1’ and if the input is ‘1’ then the output will be ‘0’ i.e., you just have to invert the input to get the output.

### 4. NAND Gate:

Trick 1:
NAND Gate is NOT + AND. So first, you can write the truth table of AND gate and whatever output you get apply NOT gate to it i.e., just invert it.

AND Gate
0 * 0 = 0 → 1
0 * 1 = 0 → 1
1 * 0 = 0 → 1
1 * 1 = 1 → 0

Trick 2:
If you find BOTH the input as ‘1’ or ‘HIGH’ or ‘TRUE’ only then the output is ‘0’ else ‘1’.
It is the opposite of the AND gate.

### 5. NOR Gate:

Trick 1:
NOR Gate is NOT + OR. So first, you can write the truth table of OR gate and whatever output you get apply NOT gate to it i.e., just invert it.

OR gate
0 + 0 = 0 → 1
0 + 1 = 1 → 0
1 + 0 = 1 → 0
1 + 1 = 1 → 0

Trick 2:
If you find BOTH the input as ‘0’ or ‘LOW’ or ‘FALSE’ only then the output is ‘1’ else ‘0’.
It is the opposite of the OR gate.

### 6. XOR Gate:

Trick 1:
If both the inputs are different the output is ‘1’ else ‘0’.

0 xor 0 = 0
0 xor 1 = 1
1 xor 0 = 1
1 xor 1 = 0

### 7. XNOR Gate:

Trick 1:
If both the inputs are the same the output is ‘1’ else ‘0’.

0 xnor 0 = 1
0 xnor 1 = 0
1 xnor 0 = 0
1 xnor 1 = 1

Trick 2:
XNOR gate is XOR + NOT. So first, you can write the truth table of XOR gate and whatever output you get apply NOT gate to it i.e., just invert it.

XOR gate
0 xor 0 = 0 → 1
0 xor 1 = 1 → 0
1 xor 0 = 1 → 0
1 xor 1 = 0 → 1

So guys! These were the tricks to construct the truth tables of all the logic gates. Initially, it may take some time to construct the truth tables, but with repeated usage, you will be able to do it without any efforts.
Hope it would be useful!