Data Loading...
LOGIC GATES
LOGIC GATES • A logic gate is an electronic circuit which makes logic decisions. • It has one output and one or more inputs. • The output signal appears only for certain combinations of input signals. • The operation of the gate is based on Boolean algebra. • Boolean algebra is the back bone of the binary system.
Truth table • It is the table that shows all possible combinations of the input and the corresponding output for a logic gate. Basic logic gates • There are three basic gates, namely, OR gate, AND gate and NOT gate.
The OR gate • There can be two or more inputs and an output. • A and B are the inputs and Y is the output, Boolean expression for OR gate is Y=A+B
• logic gate symbol
OR Gate symbolizes logic addition
Three input OR gate
• The OR gate operation is analogous to two switches in parallel.
The OR gate using two pn junction diodes
The AND gate • For an AND gate there are two or more inputs and an output. • If A and B are the inputs and Y is the output. Boolean expression for AND gate is Y = A.B
• logic gate symbol
Truth Table
The AND gate gives an output only when all its inputs are present.
• The AND operation is analogous to two switches in series. • The output is obtained only when both switches are ON.
The AND gate using two PN junction diodes
A
Voltmeter
B
reading
Y
T2
0
T4
0
0
0
T2
0
T3
1
0
0
T1
1
T4
0
0
0
T1
1
T3
1
5
1
The NOT gate (Inverter) • It is a single input gate for which the output is always the complement of the input. • Complement of 1 is zero and that of zero is1. • The complement of A is indicated by A’ (A prime) or Ᾱ(A bar).
Logic gate symbol & Truth Table
The NOT gate using transistor • A NOT gate cannot be realized by using diodes. • But it can be realized by making use of a transistor as shown in the figure.
The NOR Gate • It is an OR gate followed by NOT gate. • It can be made out of an OR gate by connecting an inverter in its output.
Logic operation • A NOR gate will have an output of 1 only when all its inputs are 0. • if any output is 1, the output will be 0. • in a NOR gate, output is true only when all inputs are false.
NOR Gate is a Universal Gate
• A NOR gate can be used to realize the basic logic functions: OR, AND and NOT. • It is often referred to as a universal gate.
As OR Gate
As AND Gate
As NOT Gate
NAND Gate
• It is an AND gate followed by a NOT Gate.
NAND Gate is a Universal Gate • A NAND gate can be used to realize the basic logic functions: OR, AND and NOT. • It is often referred to as a universal gate.
As OR Gate
As AND Gate
As NOT Gate
XOR Gate (exclusive OR gate) Circuit Symbol
Truth Table
The output is 1, only when one of the two input is 1 but not both.
XOR gate using OR, AND and NOT gate
XNOR Gate
Bubbled OR Gate • The OR gate with inverted inputs is called as Bubbled OR gate. • It is also called as negative OR gate.
• Truth Table
Bubbled AND Gate • The AND gate with inverted inputs is called as Bubbled AND gate.
Truth Table
Demorgans Theorem
ADDERS & SUBTRACTORS
Half Adder • It is 1-bit adder and carries out binary addition with the help of XOR and AND gates. • It has two inputs and two outputs. Full Adder • It has three inputs and can add three bits at a time. • It is made up of two half adders and one OR gate. • These adders can also perform subtraction by the method of 1's and 2's complements.
Half Subtractor • It uses one XOR and one AND gate.
Full Subtractor • It employs two half subtractors and one OR gate.
Half Adder • It can add 2 binary digits at a time and produce a 2-bit data. i.e.. sum and carry according to the binary addition rules. Block Diagram
Truth table
Full Adder • Full adder has three inputs and two outputs. • It can add 3 digits (or bits) at a time. • The bits A and B which are to be added come from the two registers and the third input comes from the carry generated by the previous addition. • It produces two outputs; SUM and CARRY-OUT.
Truth table
Parallel Binary Adder • A single full adder performs the addition of two one bit numbers and an input carry.
• A Parallel Adder is a digital circuit capable of finding the arithmetic sum of two binary numbers that is greater than one bit in length by operating on
corresponding pairs of bits in parallel.