## Computer organization Notes

Logic gates are the basic building blocks of any digital system. A logic gate is a electronic device implementing a Boolean function. It performs a logical operation on one or more logic inputs and produces a single logic output. The relationship between the input and the output is based on certain logic. The name logic gate is derived from the ability of such a device to make decisions, in the sense that it produces one output level when some combinations of input levels are present and a different output level when other combinations of input level are present. Inputs are the variables implemented and can have one of two states either 1 i.e. ON or HIGH or 0 i.e. OFF or LOW.

Logic gates are the electronic circuits that are made up of electronic devices. The basic logic gates such as AND, OR and NOT can be interconnected to build large digital systems. In computers, they are generally embedded in IC with a large number of other devices. The truth tables are drawn to check the operation of logic gates. These tables are drawn with all the possible values which the gate can have. The entries in truth table come out to be 2n where n is equal to the number of inputs the gate has.
The logic gates are digital circuits constructed from diodes, transistors and resistors connected in such a way that the circuit output is the result of a basic logic operation (AND, OR, NOT) performed on the inputs. These logical gates accept input of binary numbers and their output logic is based on the type of gate and what input was involved. Logic gates perform functions on binary numbers. Gates can be used to build up much better and sophisticated functions such as loops and comparisons. When used together they can easily perform multiplication and division. We can use these gates in everyday equipment starting from washing machines and microwave ovens to motion sensitive cameras and personal computers.

The basic gates are AND, OR and NOT. However there are some more gates also like NAND, NOR, XOR, X-NOR etc. NAND and NOR gates are also known as universal gates because we can construct all other gates using any of these gates. So to design logical circuit, we do not need different types of gates but only a single type is sufficient.

**AND Gate**

A circuit which performs an AND operation is shown in figure. It has n input (n >= 2) and one output. The output from AND gate is 1 if and only if all of the inputs are 1, otherwise the output from AND gate is 0. Its symbol is ‘.’. The algebraic operation symbol of AND function is the same as the multiplication symbol of ordinary arithmetic. We can either use a dot between the variables or concatenate the variables without an operation symbol between them. The two input AND-gate is shown ahead.

**The Truth Table is **

In the above symbol the output Y = A.B. the truth table for a two input AND gate is shown ahead. And gate is sensitive to input value 0 i.e. if any of the input variable is 0 the output is also 0. Here is an example of a three input AND gate. Notice that the truth table for the three input gate is similar to the truth table for the two input gate. It works on the same principle, this time all three inputs need to be high (1) to get a high output.

**The Truth Table is **

**OR Gate**

A circuit which performs an OR operation is shown in figure. It has n input (n >= 2) and one output. The output from OR gate is 1 if any of the inputs is 1. The gate output is 0 if all the inputs are 0. Its symbol is ‘+’. The algebraic operation symbol of OR function is the same as the addition symbol of ordinary arithmetic. The two input OR-gate is shown ahead.

**The Truth Table is **

In the above symbol the output Y = A.B. the truth table for a two input AND gate is shown ahead. And gate is sensitive to input value 0 i.e. if any of the input variable is 0 the output is also 0. Here is an example of a three input AND gate. Notice that the truth table for the three input gate is similar to the truth table for the two input gate. It works on the same principle, this time all three inputs need to be high (1) to get a high output.

**The Truth Table is **

**NOT Gate**

NOT gate is also known as Inverter. It has one input A and one output Y. the NOT gate is unique in the sense that it only has one input. The input to the NOT gate is inverted. The binary input state of 0 gives an output of 1 and binary input state of 1 gives an output of 0. The NOT gate is symbolized by the operator ‘~’. The NOT operation is also referred to as inversion or complementation. It’s symbolic representation is shown ahead. The presence of small circle at the edge of triangle represents the inversion as shown ahead.

**The Truth Table is **

The three basic gates can be combined to provide more complex logical functions. So any digital circuit can be drawn with the help of these three logic gates but to simplify the task of designing the digital circuits, four other gates are defined which are actually the combination of three basic logic gates.

**NAND Gate**

A AND- NOT operation is known as NAND operation. It acts in the manner of the logical operation "and" followed by negation. The output is "false" if both inputs are "true." Otherwise, the output is "true". The NAND gate is the reverse of AND gate. NAND is same as the AND gate symbol Except that it has a small circle at the output. The small circle represents the inversion operation. It has n input (n >= 2) and one output.

**The Truth Table is **

The output from NAND gate is written as Y = (A.B)’. the truth table for a two input NAND gate is shown ahead. Here is an example of a three input NAND gate. Notice that the truth table for the three input gate is similar to the truth table for the two input gate. It works on the same principle, this time any of three inputs is low (0) to get a high output.

**The Truth Table is **

It is also called as Universal Gate. The Logic NAND Gate is generally classed as a “Universal” gate because it is one of the most commonly used logic gate types. NAND gates can also be used to produce any other type of logic gate function, and in practice the NAND gate forms the basis of most practical logic circuits. By connecting them together in various combinations the three basic gate types of AND, OR and NOT function can be formed using only NAND‘s, for example.

You can obtain Printed Copies of this material by making a request at brightways.org@gmail.com with a nominal print charges.