Thursday, November 12, 2009

LOGIC GATES

A logic gate performs a logical operation on one or more logic inputs and produces a single logic output. The logic normally performed is Boolean logic and is most commonly found in digital circuits. Logic gates are primarily implemented electronically using diodes or transistors, but can also be constructed using electromagnetic relays, fluidics, optics, molecules, or even mechanical elements.

In electronic logic, a logic level is represented by a voltage or current, (which depends on the type of electronic logic in use). Each logic gate requires power so that it can source and sink currents to achieve the correct output voltage. In logic circuit diagrams the power is not shown, but in a full electronic schematic, power connections are required.

SYMBOLS AND TRUTH TABLE

Type Distinctive shape Rectangular shape Boolean algebra between A & B Truth table
AND AND symbol AND symbol A \cdot B
INPUT OUTPUT
A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1
OR OR symbol OR symbol A + B
INPUT OUTPUT
A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1
NOT NOT symbol NOT symbol \overline{A}
INPUT OUTPUT
A NOT A
0 1
1 0
In electronics a NOT gate is more commonly called an inverter. The circle on the symbol is called a bubble, and is generally used in circuit diagrams to indicate an inverted (active-low) input or output.[1]
NAND NAND symbol NAND symbol \overline{A \cdot B}
INPUT OUTPUT
A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0
NOR NOR symbol NOR symbol \overline{A + B}
INPUT OUTPUT
A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0

XOR XOR symbol XOR symbol A \oplus B
INPUT OUTPUT
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
XNOR XNOR symbol XNOR symbol \overline{A \oplus B}
INPUT OUTPUT
A B A XNOR B
0 0 1
0 1 0
1 0 0
1 1 1