# LOGIC GATES

logic gate is a basic or fundamental building block of a digital circuit. Generally we discuss logic gates having two inputs and one output. At any instant, every terminal has one of the two binary conditions low (0) or high (1), representing voltage levels.

In most logic gates, the low state is approximately zero volts (0 V), while the high state is approximately positive five volts (+5 V). In logic gates we get output in Boolean either true (1) or false (0).

There are two types of logic circuits one is combinational and other is sequential logic circuit

In digital circuit theory, sequential logic is a type of logic circuit whose output depends not only on the present value of its input signals but on the sequence of past inputs. While, combinational logic devices are those whose output depends only on present input. So logic gates are combinational logic devices.

## THERE ARE 7 LOGIC GATES WRITTEN BELOW

1. AND gate
2. OR gate
3. NOT gate

NAND & NOR are Universal Logic gates because any Boolean function (all logic gates) can be implemented without need of other gate types.

1. NAND gate
2. NOR gate

Exclusive Logic gates

1. X-OR gate
2. X-NOR gate

## BASIC LOGIC GATES

### AND GATE

The AND operation in Boolean algebra is similar to the multiplication in ordinary algebra. The output Y is “True” (1) (HIGH) when both the inputs (A & B) are “True” (1) (HIGH). Otherwise, the output is “False” (0) (LOW). To understand it more clearlu check the truth table for two input AND gate. Symbol of AND gate shown below –

#### Truth Table for Two Input AND Gate

INPUTOutput of AND Gate
A BY = A . B
000
010
100
111

### OR GATE

The OR operation in Boolean algebra is similar to the addition in ordinary algebra. The output Y is “True” (1) (HIGH) when either of the inputs (A or B) or both the inputs are “True” (1) (HIGH). If both the inputs are “False” (0) (LOW), only then the output Y is False (0) (LOW). To understand it more clearly check the truth table for two input OR gate. Symbol of OR gate shown below –

#### Truth Table for Two Input OR Gate

INPUTOutput of OR Gate
A BY = A + B
000
011
101
111

### NOT GATE

The NOT operation in Boolean algebra is nothing but complementation or inverse of logic. For logic 0 gives 1 and for 1 gives 0. This operation is indicated by a bar “–” over the input variable. Symbol of NOT gate shown below –

#### Truth Table NOT Gate

INPUTOutput of NOT Gate
A Y = Ā
01
10

## UNIVERSAL LOGIC GATES

### NAND GATE

The NAND gate – NOT gate in-front of AND gate operation makes NAND gate (N-AND). The output Y is “False” (0) (LOW) when both the inputs (A & B) are “True” (1) (HIGH). Otherwise, the output is “True” (1) (HIGH). To understand it more clearly check the truth table for two input AND gate. Symbol of AND gate shown below –

#### Truth Table for Two Input NAND Gate

Comparison of NAND v/s AND gate

INPUTOutput of NAND GateOutput of AND Gate
A BY =

A . B

A . B
0010
0110
1010
1101

### NOR GATE

The NOR gate – NOT gate in-front of OR gate operation makes NOR gate (N-OR). The output Y is “True” (1) (HIGH) when both the inputs (A & B) are “False” (0) (LOW). Otherwise, the output is “False” (0) (LOW). To understand it more clearly check the truth table for two input NOR gate. Symbol of NOR gate shown below –

#### Truth Table for Two Input NOR Gate

Comparison of NOR v/s OR gate

INPUTOutput of NOR GateOutput of OR Gate
A BY =

A + B

A + B
0010
0101
1001
1101

## EXCLUSIVE LOGIC GATES

### XOR GATE

The XOR ( exclusive-OR ) gate acts in the same way as the logical “either/or.” The output is “True” (1) (HIGH) if either, but not both, of the inputs are “True” (1) (HIGH). The output is “False” (0) (LOW) if both inputs are “False” (0) (LOW) or if both inputs are “True” (1) (HIGH).

Another way: output is 1 if the inputs are different, but 0 if the inputs are the same.

#### Truth Table for Two Input XOR Gate

INPUTOutput of XOR Gate
A BY = A ⊕ B = A .

B

+

A

. B
000
011
101
110

### XNOR GATE

The XNOR (exclusive-NOR) gate is just a XOR gate followed by an inverter (NOT gate). Its output is “True” (1) (HIGH) if the inputs are the same, and “False” (0) (LOW) if the inputs are different.

Another way: output is 1 if the inputs are the same, but 0 if the inputs are different.

#### Truth Table for Two Input X-NOR Gate

Using De Morgans’s Law A XNOR B

INPUTOutput of XNOR GateOutput of XOR Gate
A BY =

A ⊕ B

= (A +

B

) . (

A

+ B)
Y = A ⊕ B = A .

B

+

A

. B
0010
0101
1001
1110

NEXT POST
POWER SOURCE

PREVIOUS POST
CMOS, ARDUINO, TTL LOGIC LEVELS

Subscribe
Notify of 