Digital Logic
Logic Gates
Logic gate is an element to build a digital circuit logic block. It can make a logical decision for the digital circuit. The most common logic gates are AND, OR, XOR, NOT, NOR, NAND and XNOR. The logic gates NOR and NAND which are also called universal gates. Logic gates which can be one or more inputs and only produce single output.
AND Gate
A
|
B
|
F(A∩B)
|
0
|
0
|
0
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
1
|
OR Gate
A
|
B
|
F(A∪B)
|
0
|
0
|
0
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
1
|
1
|
OR gate is a basic digital logic gate that implement the logical disjunction. According to the truth table, with an operation of OR(F=A+B). OR gate produces an output of 1 when there is either or both inputs are 1.
XOR Gate
A
|
B
|
F
|
0
|
0
|
0
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
1
|
0
|
XOR gate(EOR gate or ExOR gate) is a basic logic gate that implement an exclusive or (exclusive disjunction). According to the truth table, with an operation of XOR(F=A.B'+A'.B). XOR gate will only produces output 1 when there is only one of the input is 1 and another is 0. That's mean is both of the inputs are 0 or 1, then the output will be 0.
NOT Gate
A
|
F
|
0
|
1
|
1
|
0
|
NOT gate is a basic logic gate that implement logical negation, it's also known as an inverter because it changes the input to its opposite(inverts it). According to the truth table, with an operation of NOT(F=A' or F=!A). NOT gate will only receive one input and produce an output by invert input. For example, when NOT gate received an input 1, then the output will be 0. Otherwise, if the input is 0, then the output will be 1.
NAND Gate
A
|
B
|
F
|
0
|
0
|
1
|
0
|
1
|
1
|
1
|
0
|
1
|
1
|
1
|
0
|
NAND gate(Negated AND or NOT AND) is called a universal gate because combinations of it can be used to accomplish all the basic functions. According to the truth table, with an operation of NAND[F=(A.B)']. NAND gate produces output 1 if it received either one or both 0. The output of NAND gate is reverse from AND gate.
NOR Gate
A
|
B
|
F
|
0
|
0
|
1
|
0
|
1
|
0
|
1
|
0
|
0
|
1
|
1
|
0
|
NOR gate(Negated OR or NOT OR) is called a universal gate because combinations of it can be used to accomplish all the basic functions. According to the truth table, with an operation of NOR[F=(A+B)']. NOR gate produces output 1 only when it received BOTH input 0,other than that. The output of NOR gate is reverse from OR gate.