# 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:
 Input Output 0 1 1 0
OR Gate:
 Input 1 Input 2 Output 0 0 0 0 1 1 1 0 1 1 1 1
AND gate:
 Input 1 Input 2 Output 0 0 0 0 1 0 1 0 0 1 1 1
NOR gate:
 Input 1 Input 2 Output 0 0 1 0 1 0 1 0 0 1 1 0
NAND gate:
 Input 1 Input 2 Output 0 0 1 0 1 1 1 0 1 1 1 0

## 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:
 A B C () D () Q () 0 0 1 0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 0 1

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