## Logic Gates

Logic gates are the fundamental components of the digital circuits, which process binary data encoded, in electrical signals. According to the predefined logic functions they transduce electrical inputs into electrical outputs (Mitchell 1995).

Logic gates can be classified as single-input and multiple-input logic gates, based on the 4 possible output patterns for a single-input i.e if the input is 0 the output can be 0 or 1 (two choices) and if the input is 1 the output is 0 or 1 (two choices). Each one of these four output bit patterns corresponds to a logic type: PASS0 which always outputs 0, PASS1 which always outputs 1, YES always obeys the input, NOT always opposes the input whatever the input is. OR, AND, INHIBIT, etc fall under multiple-input logic gates. The symbol and the truth table of three basic logic gates, NOT, OR, AND, are shown in Fig. 12.1.

 Input Output 1 0 0 1
 Input 1 Input 2 Output 0 0 0 0 1 1 1 0 1 1 1 1

Fig. 12.1. Three basic logic gates and their corresponding truth tables

 Input 1 Input 2 Output 0 0 0 0 1 0 1 0 0 1 1 1

Fig. 12.1. Three basic logic gates and their corresponding truth tables

The AND and OR gates convert two inputs (Iland I2) into a single output (O). In the AND gate the output is 1 when both the inputs are 1, the output is 0 in all the other three cases. Logic gates can be interconnected and the logic functions of the resulting arrays are the combination of the operations performed by individual gates.

Combinational logic circuits can be assembled by connecting the input and output terminals of the three basic logic gates AND, NOT and OR. Simple examples of the combinational logic circuits able to convert two binary inputs (I1 and I2) into a single output (O) according to the corresponding truth tables are summarised in Fig. 12.2.

Simple organic molecules in which binary operations could be performed are called as molecular switches. They adjust their structural and electronic properties when stimulated with chemical, electrical, or optical inputs. Chemical systems require proper anology between the molecular switches and the logic gates in order to execute AND, NOT, OR and more complex logic functions.

NAND gate

NAND gate

NOR gate

NOR gate

INHIBIT gate

XOR gate

XNOR gate

Fig. 12.2. Combinational logic circuits with two inputs and one output

XNOR gate

Fig. 12.2. Combinational logic circuits with two inputs and one output