Thursday, October 24, 2019

Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or XOR gate,)

Digital Logic and Basic Functions and gates ,
Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or  XOR gate,
(logic gates)

About Digital Logic

Digital or Binary logic has fascinated many people over the years. The very idea that a two-valued number system can possible be the basic for the most powerful and sophisticated computers seem- astounding, to say the least. Nevertheless, it is so and the how  and the why of this requires some Explanation. Everything in the digital world is based on the binary number system.  Numerically, this involves only two symbols: 0 and 1 . Logically, we can use these symbols or we can equate them with others according to the needs of the moment. thus, when dealing with digital logic, we can specify that:                


0 = false = no 
1 = true = yes


Using this two-valued logic system, every statement or condition must be either "true" , it cannot be partly true and partly false. While this approach may seem may seem limited, it actually works quit nicely, and can be expanded to express very complex relationships and interactions among any number of individual conditions. One essential reason for basing logical  operations on the binary number system is that it is easy to design simple, stable electronic circuits that can switch back and forth between two clearly-defined states, with no ambiguity attached. it is also readily possible to design and build circuits that will remain indefinitely in one state unless and until they are deliberately switched to the other state. this makes it possible to construct a machine (the computer) which can remember sequences of events and adjust its behavior accordingly.


Digital logic may be divided into two classes: combinational logic, in which logic outputs are determined by the logical function being performed and the logical input states at that particular moment and sequential logic, in which the outputs also depend on the prior states of those outputs. both classes of logic are used extensively in all digital computers. since both types of logic circuits begin with logic gates to combine logical input signals in various way to produce the desired outputs, we will begin on the next page by seeing how the basic logic gates work.


Basic Logical Functions and Gates

While each logical element or condition must always have a logic value of either "0" or "1" , we also need to have ways to combine different logical signals or conditions to provide a logical result. 

For example, consider the logical  statement: "If move the switch on the wall up, the light will turn on." At first glance, this seems to be a correct statement. However, we look at a few other factors, we realize that there's  more to it than this. In this example, a more complete statement would be: "If move the switch on the wall up and the light bulb is good and the power is on, the light will turn on," 

If we look at these two statements as logical expressions and use logical terminology, we can reduce the first statement to: 

Light = switch

This means nothing more than that the light will follow the action of the switch, so that when the switch is up/on/true/ 1 the light will also be on/true/1. conversely, if the switch is down/off7false/0 the light will also be off/false/0.



Light = Switch and bulb and power

Normally, We use symbols rather than words to designate the and function that we' re using to combine the separate variables of Switch, bulb, and Power in this expression. The symbol normally used is a dot, Which is the same symbol used for multiplication in some mathematical expressions. Using this symbol, our three-variable expression becomes: 

Light = Switch • Bulb • Power 

When We deal with logical circuits (as in computers), We not only need to deal with logical functions; We also need some special symbols to denote these functions in a logical diagram. There are three fundamental logical operations, from Which all other functions, no matter how complex, can be derived. These functions are named and, or, and not. Each of these has a specific symbol and a clearly-defined behavior, as follows:



The AND Gate

The AND gate implements the AND Function. the gate shown to the left, both inputs must have logic 1 signals applied to them in order for the output to be a logic 1. With either input at logic 0, the output will be held to logic o. 

There is no limit to the number of inputs that may be applied to an AND function, so there is no functional limit to the number of inputs an AND  gate may have. However , for practical reasons, commercial  AND  gates are most commonly manufactured with 2,3, or 4 inputs. A standard integrated Circuit (IC) package contains 14 or 16 pins, for practical size and handling. A  standard 14-pin package can contain four 2-input gate, three 3-input gates, or two 4-input gates, and still have room for two pins for power supply connections 


AND Operation  


The expression  X = A * B   read  as  "X  equals  A  AND B ".

The multiplication sign stands for the AND  operation, same for ordinary multiplication of 1s and 0s. 

The AND gate operation produces a result of 1 occurs only for the single case when all of the input variables are 1. 
The output is 0 for any case where one or more inputs are 0. 



Two inputs AND  gate and its table is bellow :


Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or  XOR gate,
(logic gates)






Three inputs AND gate and its truth table is bellow :



Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or  XOR gate,
(three inputs logic gate)


The OR Gate

The OR gate is sort of the reverse of the AND gate. The OR  function, like its verbal counterpart, allows the output to be true if any one or more of its inputs are true. verbally, we might say, "If it is raining OR  if turn on the sprinkler, the lawn will be wet ."  Note that the lawn will still be wet if the sprinkler is on and it is also training. this is correctly reflected by the basic OR  function. in symbols, the OR  function is designated with a plus sign (+). in logical diagrams, the symbol to the left designates the  OR gate. As with the  AND  function, the OR  function can have any number of inputs. However, practical commercial  OR  gates are mostly limited to 2,3, and 4 inputs, as with AND  gates. 



OR Operation

The expression X = A + B  read as  "X  equals A OR B".
The  + sign stands for the OR operation, not for ordinary addition.
The OR operation produces a result of 1 when any of the input variable is 1.
The OR operation produces a result of 0 only when all the input variables are 0.


two inputs OR gate and its truth table is as bellow :
Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or  XOR gate,
(two input or gate)




Three inputs OR gate and its truth table is bellow :

Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or  XOR gate,
(three input or gate)






The NOT gate or Inverter 

The inverter is a little different from AND  and OR gates in that it always has exactly one input as well as one output. whatever logical state is applied to the input, the opposite state will appear at the output. the  NOT function, as it is called, is necessary in many applications and highly useful in others. A  practical verbal application might be. the door is  NOT locked = you may enter  the NOT  function is denoted by a horizontal bar over the value to be inverter, as shown in the figure to the left. in some case a single quote mark (') may also be used for this  purpose: 0' = 1 and 1' = 0. for greater clearity in some logical expressions, we will use the overbar most of the time.


in the inverter symbol, the triangle actually denotes only an amplifier, which in digital term means that it "cleans up" pie signal but does not change its logical sense. it is the circle at the output which denotes the logical inversion. the circle could have been placed at the input instead, and the logical meaning would still be the same      for example, if the variable A is subjected to the  NOT  operation, the result x can be expressed as x = A'  where the prime(')  represents the  NOT  operation. this expression is read as: 


x equals NOT A 
x equals  the inverse of A 
x equals the complement of A 

Each of these is in common usage and all indicate that the logic value of x = A' is opposite to the logic value of A. The truth table of the NOT operation NOT operation is as follows.


NOT Operation


 The truth table of the NOT operation NOT operation is as follows:


Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or  XOR gate,
(not logic gate with transistor switch)

1 = 0 Because NOT 1 is 0
0 = 1 Because NOT 0 is 1 

The NOT  operation is also referred to as inversion or complementation, and these term are used interchangeably.the logic gates shown above are used in various combinations to perform tasks of any level of complexity. some functions are so commonly used that they have been given symbols of their own and are often packaged so as to provide that specific function directly. on the next page, we'll begin our coverage of these functions.

Derived logical functions and gates

While the three basic functions  AND, OR, and  NOT are sufficient accomplish all possible logical functions and operations, some combinations are used so commonly that they have been given names and logic symbols of their own. We will discuss three of these on this topic. the first is called  NAND, and consists of an AND  function followed by a NOT  function. The second, as you might expect, is called  NOR.  this is an OR  function followed by NOT  the third is a variation of the OR  function, called the Exclusive-OR,  or  XOR  function. As with the three basic logic functions. each of these derived functions  has a specific logic symbol and behavior,which we can summarize as follow:


The NAND gate


The NAND gate implements the NAND function, which is exactly inverted from the AND  function you already examined. with the gate shown to the left, both inputs must have logic  1 signals applied to them in order for the output to be a logic 0. with either input at logic 0, the output will be held to logic 1.


The circle at the output of the NAND  gate denotes the logical inversion, just as it did at the output of the inverter. Also in thefigure to the left, note that the overbar is a solid bar over both input values at once. this shows that it is the AND  function itself that is inveterd , rather than each separate input. NAND is the same as the AND  gate symbol except that it has a small circle on the output. this small circle represents the inversion operation. therefore, the output expression of the two input NAND  gate is:

x = (AB)


Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or  XOR gate,
(nand logic gate)

As with AND,  there is no limit to the number of inputs that may be applied to a NAND function, so there is no functional limit to the number of inputs a NAND  gate may have. However, for practical reason , commercial NAND gates are most commonly manufactured with 2,4 or 4 inputs, to fit in a 14-pin or 16-pin package.


The NOR gate

The NOR  gate is an OR  gate with the output inverted. where the OR  gate allows the output to be true (logic 1) if  any one or more of its inputs are true, the NOR  gate inverts this and forces the output to logic 0 when any input is true.  in symbols, the NOR function is designated with a plus sign (+), with an overbar over the entire expression to indicate the inversion. in logical diagrams, the symbol to the left designates the NOR  gate. As expected, this is an OR  gate with a circle to designate the inversion. NOR  is the same  as the OR  gate symbol except that it has a small circle on the output. this small circle represents the inversion operation. therefore the output expression of the two input NOR  gate is:

X = ( A + B)'


Digital Logic and Basic Functions and gates (AND gate, OR gate, NOT gate, NOR gate, NAND gate, The Exclusive-OR, or  XOR gate,
(nor logic gate)
The NOR function can be have any number of inputs, but practical NOR gates are mostly limited to 2,3, and 4 inputs, as with other gates in this class, to fit in standard IC  packages.


The Exclusive-OR, or XOR Gate

The exclusive-OR, or XOR  function is an interesting and useful variation on the basic OR  function. Verbally, it can be stated as, "Either A or B, but not both." The XOR  gate produces a logic 1 output only if its two inputs are different. if the inputs are the same, the output is a logic 0.  The XOR  symbol is a variation of the standard OR symbol . it consists of a plus (+) sign with a circle around it. the logic symbol, as shown here, is a variation on the standard  OR  symbol. Unlike standard  OR/NOR and AND/NAND functions, the XOR function always has exactly two inputs, and commercially manufactured XOR  gate are the same. four XOR  gates fit in a standard 14-pm IC package the three derived functions shown above are by no means the only ones, but these  from the basic of all the others. Next we will begin our look at practical applications for logic gates in various combinations,  to see just how these simple gate can be combined to perform every possible operation in a computer.

  • Choose the correct answers in the following questions.
  • Boolean algebra is different from ordinary algebra in which way?
  • Boolean algebra can represent more than 1 discrete level between 0 and 1 
  • Boolean algebra has only 2 discrete levels: 0 and 1 
  • Boolean algebra can describe up to 3 logic levels 
The are actually the same 


Some Advance Tips
If you like this article so please share this post , and if you know to interest about RAM, ROM, and PC so visit my site : https://www.digitaltech.net.in






























No comments:

Post a Comment