Logic Gates

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.

AND Gate: A circuit which performs an AND operation is shown in figure. It has n input (n ≥ 2) and one output.

Y = A  AND B AND C … N

Y = A. B. C … N

Y = ABC … N

Logic Diagram:

AND Gate

Truth Table:

Inputs

Outputs
A B

AB

0

0 0
0 1

0

1

0 0
1 1

1

OR Gate: A circuit which performs an OR operations is shown in figure. It has n input (n ≥ 2) and one output.

Y = A OR B OR C … N

Y = A + B + C … N

Logic Diagram:

OR Gate

Truth Table:

Inputs

Outputs
A B

A + B

0

0 0
0 1

1

1

0 1
1 1

1

NOT Gate: NOT Gate is also known as Inverter. It has one input A and one output Y.

Y = NOT A

Y = Ᾱ

Logic Diagram:

NOT Gate

Truth Table:

Inputs

Outputs
A

B

0

1
1

0

NAND Gate: A NOT – AND operation is known as NAND operation. It has n input (n ≥ 2) and one output.

Y = A NOT AND B NOT AND C … N

Y = A NAND B NAND C … N

Logic Diagram:

NAND Gate

Truth Table:

Inputs

Output

A B

\(\overline{AB}\)

0

0 1
0 1

1

1

0 1
1 1

0

NOR Gate: A NOT – OR operation is known as NOR operation. It has n input (n ≥ 2) and one output.

Y = A NOT OR B NOT OR C … N

Y = A NOR B NOR C … N

Logic Diagram:

NOR Gate

Truth Table:

Inputs

Output
A B

\(\overline{A\,\,+\,\,B}\)

0

0 1
0 1

0

1

0 0
1 1

0

XOR Gate: 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 sometime as X – OR gate. It has n input (n ≥ 2) and one output.

Y = A XOR B XOR C … N

Y = A  ⊕ B ⊕ C … N

\(Y\,\,=\,\,\overline{AB}\,\,+\,\,\overline{AB}\)

Logic Diagram:

XOR Gate

Truth Table:

Inputs

Outputs
A B

A ⊕ B

0

0 0
0 1

0

1

0 1
1 1

0

XNOR Gate: 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 sometime as X – NOR gate. It has n input (n ≥ 2) and one output.

Y = A XOR B XOR C … N

\(Y\,\,=\,\,\,A\,\,\overline{\oplus }\,\,B\,\,\overline{\oplus \,}\,C……N\)

\(Y\,\,=\,\,\,\overline{AB}\,\overline{\oplus }\,\,\overline{AB}\)

Logic Diagram:

XNOR Gate

Truth Table:

Inputs

Output
A B

\(A\,\,\overline{\oplus }\,\,B\)

0

0 1
0 1

0

1

0 0
1 1

1