Basic Knowledge of Logic Gates: Basic Gates

Physics

example

Types of logic gates

Attached figure show different types of gates and Boolean functions of outputs.
Note:
Digital signals are denoted by 1 and 0 (or High and Low).

definition

Truth Table

Truth table is a table that lists all possible inputs and their corresponding outputs for a given digital circuit.
NOT gate:
InputOutput
0
1
10
OR Gate:
Input 1Input 2Output
0
00
0
1
1
10
1
111
AND gate:
Input 1Input 2Output
00
0
010
100
111
NOR gate:
Input 1Input 2Output
001
010
100
110
NAND gate:
Input 1Input 2Output
001
011
101
110

example

Combination of gates

To construct truth table of combination of gates, following steps are required:
1. Size of the truth table is given by where number of inputs and number of outputs
2. List down all possible combinations of inputs in the truth table. 
3. For each input, find output of each logic gate and fill in the truth table according to its behaviour moving along with the direction of signals.

Consider the circuit given in the figure. Its truth table is given by:
ABC ()D ()Q ()
00100
01111
10000
11001
 

definition

Universal Gates

NAND and NOR gates are called universal gates because any other gate can be derived with the use of combination of only NAND gates (or only NOR gates).
Construction of AND, OR and NOT gate using NAND gate is shown in the attached figure.