Logic Gates


Logic gates are electronics circuits which process logic signals. The values (states) of the logic signals are true or false, therefore they are represent in binary form with 0 and 1. There are two ways of representing these values, one is so called positive logic - where 0 = false and 1 = true, and the other is so called negative logic - where 0 = true and 1 = false. Normally the positive supply voltage (+Vs) represents true or 1, and the negative or 0 V (this depends on the electronics technology used for logic gates circuits) represents false or 0.

Every logic gate execute some logic function. The basic logic gates are identified by their logic function, so we have NOT, AND, OR, NAND, NOR, XOR and XNOR gate. With different combination in connection of these logic gates, we can implement block that will be execute some more complex logic function. The simple logic function can be implemented with switches or diodes, for example, switches in series can perform AND function and switches in parallel can perform OR function.

NOT Gate

 

The NOT gate (also known as inverter) inverts the state of the input signal and send it to its output. If we have a true state on the input, then the output will have false state, and vice versa if we have a false state on the input of the gate, then the state of the output will be true. On the Picture 1 are shown the traditional symbol of NOT Gate, the table of truth which shows the state of the output for every possible state of the input and the logic function of the gate. The table of truth is a good way to represent the logic function of a gate. If IN = A and OUT = Q, then Q = NOT A, and this is actually the logic function of the NOT Gate.


Picture 1: NOT Gate - symbol, table of truth and logic function


AND Gate

 

The AND Gate executes the AND logic function with its inputs and sends the result to its output. An AND Gate can have two or more inputs, and its output is true only if all inputs are true. On the Picture 2 are shown the traditional symbol of AND Gate with two inputs, the table of truth and the logic function of the gate. If IN 1 = A and IN 2 = B, then Q = A AND B.


Picture 2: AND Gate - symbol, table of truth and logic function


OR Gate

 

The OR Gate executes the OR logic function with its inputs and sends the result to its output. An OR gate can have two or more inputs, and its output is true if at least one input is true. On the Picture 3 are shown the traditional symbol of OR Gate with two inputs, the table of truth and the logic function of the gate. If IN 1 = A and IN 2 = B, then Q = A OR B.


Picture 3: OR Gate - symbol, table of truth and logic function


NAND Gate

 

This gate is actually an AND Gate with the inverted output. An NAND gate can have two or more inputs, and its output is true if not all inputs are true. On the Picture 4 are shown the traditional symbol of NAND Gate with two inputs, the table of truth and the logic function of the gate. The inverted output is shown by the 'o' on the output. If IN 1 = A and IN 2 = B, then Q = NOT (A AND B).


Picture 4: NAND Gate - symbol, table of truth and logic function


NOR Gate

 

This gate is an OR Gate with the inverted output. An NOR gate can have two or more inputs, and its output is true if no inputs are true. On the Picture 5 are shown the traditional symbol of NOR Gate with two inputs, the table of truth and the logic function of the gate. If IN 1 = A and IN 2 = B, then Q = NOT (A OR B).


Picture 5: NOR Gate - symbol, table of truth and logic function


XOR Gate

 

The exclusive OR Gate executes the XOR logic function with its two inputs and sends the result to its output. The output is true if either input 1 or input 2 is true, but not when both are true or both are false. In other words, the output of XOR Gate is true if its two inputs are different. The XOR Gate can have only two inputs. On the Picture 6 are shown the traditional symbol of XOR Gate, the table of truth and the logic function of the gate. If IN 1 = A and IN 2 = B, then Q = (A AND NOT B) OR (B AND NOT A).


Picture 6: XOR Gate - symbol, table of truth and logic function


XNOR Gate

 

This gate is an XOR Gate with the inverted output. The output is true if both of the inputs are true or if both of the inputs are false. In other words, the output is true if inputs are same. The XNOR Gate can only have two inputs. On the Picture 7 are shown the traditional symbol of XNOR Gate, the table of truth and the logic function of the gate. If IN 1 = A and IN 2 = B, then Q = (A AND B) OR (NOT A AND NOT B).


Picture 7: XNOR Gate - symbol, table of truth and logic function

No comments:

Post a Comment