Basic Logic Gates


Home

 


Adders Theory
 


Half Adder lab
 


Full Adder lab
 


Decoder lab
 


multiplexer lab
 


Demux lab
 


Seven Segment Display
 

        Binary logic deals with variables that take on two discrete values and with operations that assume logical meaning. The two variables take may be called by different names (e.g., true and false, yes and no, 0 and 1,etc.). Binary logic is used to describe the manipulation and processing of binary number mathematically. It is particularly suited for the analysis and design of digital systems, and it consists of binary variables (A,B,etc.) and logical operations (AND, OR, NOT, etc. ).There are four  basic logic gates: AND, OR, XOR, and NOT. Also, there is  another three basic types comes from the previously mentioned gates they are: NAND, NOR, and XNOR. We can talk about them in details taking each gate alone.

The AND gate: -
           This logic operation is represented by dot or by the absence of operator. e.g., A· B or AB . It means that  the result will equal 1 if and only if both inputs are equal 1. It may be represented by two switches connecting in series to a light source so that the lamp will never light unless the two switches are closed. In the symbol, the input terminals are shown at left and the output terminal is at right. The output is "true", 1 or "yes",  when both inputs are "true." Otherwise, the output is "false",0 or "no". This can be shown briefly by the truth table. The truth table is the table that give the relationship between inputs and outputs function generally it consist of n inputs and 2n relative output as shown bellow. The following figures show the circuit symbol and the truth table for an AND gate.
 

I/P 1

I/P 2

O/p

0

0

0

0

1

0

1

0

0

1

1

1

 


The OR Gate: -

The OR gate is logic operation that is represented by plus sign(+) e.g., A+B. It means that  the result will equal 1 if any one or more of the inputs are equals1. The following figure show the circuit symbol and for an OR gate and the truth table for it. It is sort of the reverse of the AND gate. It may be represented by two switches connected in parallel form and that if one switch is closed the current flows and if you have a lamp it will light. 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.

I/P 1

I/P 2

O/p

0

0

0

0

1

1

1

0

1

1

1

1


 








 


 


 

 




 

The NOT Gate, or Inverter: -
 
The inverter is the gate that  has one input and one output. Its output is the opposite state of the input and for that it takes it name. The NOT function is denoted by (' ) or a horizontal bar over the value to be inverted  as Ā. See the figure and truth table

i/P

o/p

0

1

1

0





 

The Exclusive-OR, or XOR Gate: -
       
   
 Exclusive-OR, or XOR is denoted by the symbol Å. Its function is to produce a logic 1 output only one of  its two inputs is equal to 1. It can be stated as, "Either A or B, but not both." . The XOR function always has exactly two inputs, and commercially manufactured XOR gates are the same. Four XOR gates fit in a standard 14-pin IC package. The symbol circuit and truth table for xor gate is shown bellow:

i/P 1

i/P 2

o/p

0

0

0

0

1

1

1

0

1

1

1

0


 




 

The NAND Gate: -
    
     
The NAND gate is  the inverse of  the AND function. If either inputs at logic 0, the output will be held to logic 1. As shown in the figure the circle at the output of the NAND gate denotes the logical inversion, just as it did at the output of the inverter. As with AND, there is no limit to the number of inputs that may be applied to a NAND function but it most commonly manufactured with 2, 3, or 4 inputs, to fit in a 14-pin or 16-pin package. 

i/P 1

i/P 2

O/p

0

0

1

0

1

1

1

0

1

1

1

0


The NOR Gate: -
        
The NOR gate is an OR gate with the output inverted. The NOR gate gives the output a logic 0 when any input is 1.The NOR operation is designated with a plus sign (+), with an overbar over the entire expression to indicate the inversion. The NOR function can have any number of inputs, but practical commercial NOR gates are mostly limited to 2, 3, and 4 inputs, as with other gates in this class, to fit in standard IC packages

i/P 1

i/P 2

o/p

0

0

1

0

1

0

1

0

0

1

1

0







 

The Exclusive-NOR Gate: -
         
  
The Exclusive-NOR, or XNOR denoted by the symbol Å with an overbar over the entire expression to indicate the inversion. It is equal to 1 if the two inputs are similar, either if  they are 0 or 1.The table and figure bellow illustrate this . The circle at the output represents the inversion of the output.

i/P 1

i/P 2

o/p

0

0

1

0

1

0

1

0

0

1

1

1







 

Basic Logic Gates Experiment:: -
This simulation uses java you must install and enable it to see the simulation . It represents the four basic logic gates AND, OR, NOT, and XOR. Do the experiment by changing the values of each input from its selection choice box using the mouse click.

your browser dosnot support java

 

Digital Design And Analysis Techniques:-

         
One of the primary requirements when dealing with digital circuits is to find ways to make them as simple as possible. This constantly requires that complex logical expressions be reduced to simpler expressions that nevertheless produce the same results under all possible conditions. The simpler expression can then be implemented with a smaller, simpler circuit, which in turn saves the price of the unnecessary gates, reduces the number of gates needed, and reduces the power and the amount of space required by those gates. One tool to reduce logical expressions is the mathematics of logical expressions, introduced by George Boole in 1854 and known today as Boolean Algebra. The rules of Boolean Algebra are simple and straight-forward, and can be applied to any logical expression. The resulting reduced expression can then be readily tested with a truth table, to verify that the reduction was valid.
The rules of Boolean Algebra are:

  
  A·0  = 0 
    A·1  = A
    A·A  = A
    A·A' = 0
    A+0  = A
    A+1  = 1
    A+A  = A
    A+A' = 1
    A''  = A

Associative Law
(A·B)·C = A·(B·C) = A·B·C
(A+B)+C = A+(B+C) = A+B+C


Distributive Law
A·(B+C) = (A·B) + (A·C)
A+(B·C) = (A+B) · (A+C)

Commutative Law
A·B = B·A
A+B = B+A


Precedence

AB = A·B
A·B+C = (A·B) + C
A+B·C = A + (B·C)


DeMorgan's Theorem
(A·B)' = A' + B'  
(A+B)' = A' · B'  

 After you denote  your output function from the truth table, you can then simplify it using this rules to make  your circuit as simple as possible. The output function is demonstrated from the truth table by selecting all the outputs those equal the logic "1" and gives there summation .