Courses

# Logic Gates Electrical Engineering (EE) Notes | EduRev

## Electrical Engineering (EE) : Logic Gates Electrical Engineering (EE) Notes | EduRev

The document Logic Gates Electrical Engineering (EE) Notes | EduRev is a part of the Electrical Engineering (EE) Course Digital Electronics.
All you need of Electrical Engineering (EE) at this link: Electrical Engineering (EE)

## Seven Basic Logic Gates

Digital electronics relies on the actions of just seven types of logic gates, called AND, OR, NAND (Not AND), NOR (Not OR), XOR (Exclusive OR) XNOR (Exclusive NOR) and NOT.

Because, in binary logic there are only two states, 1 and 0 or ‘on and off,’ NOT in the world of binary logic therefore means ‘the opposite of’. If something is not 1 it must be 0, if it is not on, it must be off. So NAND (not AND) simply means that a NAND gate performs the opposite function to an AND gate.

A logic gate is a small transistor circuit, basically a type of amplifier, which is implemented in different forms within an integrated circuit. Each type of gate has one or more (most often two) inputs and one output.

The principle of operation is that the circuit operates on just two voltage levels, called logic 0 and logic 1. When either of these voltage levels is applied to the inputs, the output of the gate responds by assuming a 1 or a 0 level, depending on the particular logic of the gate. The logic rules for each type of gate can be described in different ways, by a written description of the action, by a truth table, or by a Boolean algebra statement.

Boolean statements use letters from the beginning of the alphabet, such as A, B, C etc. to indicate inputs, and letters from the second half of the alphabet, very commonly X or Y and sometimes Q or P to label an output. The letters have no meaning in themselves, other than just to label the various points in the circuit. The letters are then linked by a symbol indicating the logical action of the gate.

The • symbol indicates AND although in many cases the • may be omitted. (A•B may also be written as AB or A.B)

+ indicates OR

⊕ indicates XOR (Exclusive OR)

Although the symbols • and + are the same as those used in normal algebra to indicate product (multiplication) and sum (addition) respectively, in binary logic the + symbol does not exactly correspond to sum. In digital logic 1 + (OR) 1 = 1, but the binary sum of 1 + 1 = 102, therefore in digital logic + must always be considered as OR.

Three further types of logic gate give an output that is an inverted version of the three basic gate functions listed above, and these are indicated by a bar drawn above a statement using the AND, OR, or XOR symbols to indicate NAND, NOR and XNOR.

A•B means A AND B but means A NAND B

## For example:

An AND gate gives an output of logic 1 when input A AND input B are at logic 1, but a NAND gate would give a logic 0 output for the same input conditions. Also where the AND gate gives a logic zero for a particular input combination, the NAND gate would give a logic 1. The ‘N’ in the gate’s name, or the bar above the Boolean expression therefore indicates that the output logic is ‘inverted’. In digital logic NAND is ‘NOT’ AND, or the opposite of AND. Similarly NOR is ‘NOT’ OR, and XNOR is ‘NOT’ XOR.

The final gate type, the NOT gate or inverter is a single input gate that has an output having the opposite logic state, or the inverse of the input.

Table 2.1.1 shows each of the seven basic logic gates, which may be illustrated by either the traditional "Distinctive Shape" ANSI symbol or the newer rectangular IEC symbol, and a written description of its logic function compared with its Boolean equation. ## Logic ICs

Fig. 2.1.1 illustrates a selection of the basic logic gates that are available from a number of manufacturers in standard families of integrated circuits. Each logic family is designed so that gates and other logic ICs within that family (and other related families) can be easily combined, and built into larger logic circuits to carry out complex functions with the minimum of additional components.

Typically, standard logic gates are available in 14 pin or 16 pin DIL (dual in line) chips. The number of gates per IC varies depending on the number of inputs per gate. Two−input gates are common, but if only a single input is required, such as in the 7404 NOT(or inverter) gates, a 14 pin IC can accommodate 6 (or Hex) gates. The greatest number of inputs on a single gate is on the 74133 13 input NAND gate, which is accommodated in a 16 pin package. ## How Logic Gates Work

With Fig 2.1.2 you can check out the operation of the basic logic gates for yourself. The interactive animation allows you to choose any one of the 7 basic gates from the top bar and click switches A and B to test its operation. Use the animation to become familiar with the operation of each of the gates, comparing the results you see with the truth tables provided. To easily understand more complex digital circuits it is important to develop a good mental picture of the expected output from each gate for any possible input.

## Logic Functions

Fig 2.1.2 also shows how the seven basic logic functions can also be described using a ‘truth table’ to show the relationship between the output (X) and all possible input combinations for inputs A and B, shown as a four value binary count from 00 to 11. Each diagram shows the input and output conditions for one of the seven logic functions in its two input form. Some types of gate however, are also available with more (e.g. 3 to 13) inputs. For these gates the truth tables would need to be extended to include all possible input conditions.

## Universal Gates

Because gates are manufactured in IC form, typically containing two to six gates of the same type, it is often uneconomical to use a complete IC of six gates to perform a particular logic function. A better solution may be to use just a single type of gate to perform any of the logic operations required. Two types of gate, NAND and NOR are often used to perform the functions of any of the other standard gates, by connecting a number of either of these ‘universal’ gates in a combinational circuit. Although it may not seem efficient to use several universal gates to perform the function of a single gate, if there are a number of unused gates in one or more NAND and NOR ICs, these can be used to perform other functions such as AND or OR rather than using extra ICs to perform that function. This technique is especially useful in the design of complex ICs where whole circuits within the IC can be fabricated using a single type of gate. image naming is required

### NOT Function

a. Connecting the inputs of the NAND gate together creates a NOT function. b. Alternatively the NOT function can be achieved by using only 1 input and connecting the other input permanently to logic 1. ### AND Function

c. Adding the NOT function (an inverter) to the output of a NAND gate creates an AND function. ### OR Function

d. Inverting the inputs to a NAND gate creates an OR function. ### NOR Function

e. Using a NOT function to invert the output of an OR function creates a NOR function. ### XOR function

f. Four NAND gates (a single IC) connected as shown creates an XOR function (and a Quad NAND IC is about 15% cheaper than a Quad XOR IC). ### XNOR Function

g. Inverting the output of the XOR function creates an XNOR function. Similar conversions can be achieved using NOR gates, but as NAND gates are generally the least expensive ICs, the conversions shown in Fig. 2.1.3 are more frequently used. The reason for such conversions is usually cost. This may not seem very useful since none of the basic 74 series ICs are expensive, but when several thousand units of a particular circuit are to be manufactured, the small savings in cost and space on printed circuit boards by maximising the use of otherwise unused gates in multi gate ICs can become very important.

Offer running on EduRev: Apply code STAYHOME200 to get INR 200 off on our premium plan EduRev Infinity!

## Digital Electronics

92 videos|91 docs|12 tests

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

;
{"ft_lang_label":"__label__en","ft_lang_prob":0.91546696,"math_prob":0.95303804,"size":7349,"snap":"2021-31-2021-39","text_gpt3_token_len":1635,"char_repetition_ratio":0.14594963,"word_repetition_ratio":0.0059479554,"special_character_ratio":0.22152674,"punctuation_ratio":0.09005377,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9700277,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],"im_url_duplicate_count":[null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-08-05T01:32:56Z\",\"WARC-Record-ID\":\"<urn:uuid:2f0dfbb4-1ab4-43f8-8a41-e4a8f18161db>\",\"Content-Length\":\"354825\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:38344877-fba3-4ce8-9876-9cee55fab625>\",\"WARC-Concurrent-To\":\"<urn:uuid:be14cd61-9bb2-48aa-98c1-43e62c6b0c75>\",\"WARC-IP-Address\":\"34.87.155.163\",\"WARC-Target-URI\":\"https://edurev.in/studytube/Logic-Gates/b519fdf6-87eb-4ace-afec-7f861f4518fa_t\",\"WARC-Payload-Digest\":\"sha1:BURTPDWYWWRY5CZ3OVVJ44PRAV2CFKHI\",\"WARC-Block-Digest\":\"sha1:L7BHFAXQOGT457DVJLKYDHSWGH3SODVD\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-31/CC-MAIN-2021-31_segments_1627046155268.80_warc_CC-MAIN-20210805000836-20210805030836-00260.warc.gz\"}"}