UNIT-3-FCD
UNIT-3-FCD
• From the above table, it is clear that the XOR gate gives the result 1 when both
of the inputs are different. When both of the inputs are the same, the XOR
gives the result 0.
Arithmetic Circuits- Half Adder
2) 2-input AND Gate:
The XOR gate is unable to generate the carry bit. For this purpose, we use another
gate called AND Gate. The AND gate gives the correct result of the carry.
• The above is the symbol of the AND gate. In the above diagram, 'A' and 'B' are
the inputs, and 'OUT' is the final outcome after performing AND operation of
both numbers.
• There is the following truth table of AND Gate:
Arithmetic Circuits- Half Adder
• From the above table, it is clear that the AND gate gives the result 1 when both of
the inputs are 1. When both of the inputs are different and 0, the AND gates gives
the result 0.
Half-Adder logical circuit:
• So, the Half Adder is designed by combining the 'XOR' and 'AND' gates and provide
the sum and carry.
Truth Table:
Arithmetic Circuits- Full Adder
In the above table,
• 'A' and' B' are the input variables. These variables represent the two significant
bits which are going to be added
• 'Cin' is the third input which represents the carry. From the previous lower
significant position, the carry bit is fetched.
• The 'Sum' and 'Carry' are the output variables that define the output values.
• The eight rows under the input variable designate all possible combinations of
0 and 1 that can occur in these variables.
Note: We can simplify each of the output 'Boolean function' with the help of the
unique map method.
The SOP form can be obtained with the help of K-map as:
Arithmetic Circuits- Full Adder
3-Input Ex-OR Gate:
• In some cases, we need to have XOR Gates with more than 2 inputs. More than
2 input XOR function is called as “Odd function”.
• The Boolean function for the 3- input XOR gate is:
A ⊕ B ⊕ C = A’ B ’C + A’ B C’ + A B’ C’ + A B C
3 Input EX-OR Logic Symbol:
Truth Table:
Arithmetic Circuits- Full Adder
• Sum = x' y' z+ x'yz’+ xy'z'+ xyz (Exxclusive OR of x,y,z) = Q = x ⊕ y ⊕ z
Carry = xy+xz+yz
ie xy’z + xyz = xz(y + y’) = xz
x’yz + xyz = yz(x + x’) = yz
xyz + xyz’ = xy(z + z’) =xy
Therefore Carry= xy + xz + yz
Construction of Full Adder Circuit:
Arithmetic Circuits- Full Adder
The above block diagram describes the construction of the Full adder circuit.
In the above circuit, there are two half adder circuits that are combined using the
OR gate.
• The first half adder has two single-bit binary inputs A and B.
• As we know that, the half adder produces two outputs, i.e., Sum and Carry.
• The 'Sum' output of the first adder will be the first input of the second half
adder, and the 'Carry' output of the first adder will be the second input of the
second half adder.
• The second half adder will again provide 'Sum' and 'Carry'.
• The final outcome of the Full adder circuit is the 'Sum' bit.
• In order to find the final output of the 'Carry', we provide the 'Carry' output of
the first and the second adder into the OR gate.
• The outcome of the OR gate will be the final carry out of the full adder circuit.
• The MSB is represented by the final 'Carry' bit.
Arithmetic Circuits- Full Adder
• The full adder logic circuit can be constructed using the 'AND' and the ‘XOR’
gate with an ’OR’ Gate.
• Let, sum, S is the Least significant bit and carry, Cout is the Most significant bit of
resultant sum.
• It is easy to fill the values of outputs for all combinations of inputs in the truth
table. Just count the number of ones present at the inputs and write the
equivalent binary number at outputs.
• If Cin is equal to zero, then Full adder truth table is same as that of Half adder truth
table.
Arithmetic Circuits- Full Adder
• We will get the following Boolean functions for each output after
simplification.
S=A⊕B⊕Cin
cout=AB+(A⊕B).Cin
• The sum, S is equal to one, when odd number of ones present at the inputs.
We know that Ex-OR gate produces an output, which is an odd function. So, we
can use either two 2input Ex-OR gates or one 3-input Ex-OR gate in order to
produce sum, S. We can implement carry, Cout using two 2-input AND gates &
one OR gate. The circuit diagram of Full adder is shown in the following figure
Arithmetic Circuits- Full Adder
This adder is called as Full adder because for implementing one Full adder, we
require two Half adders and one OR gate.
If Cin is zero, then Full adder becomes Half adder. We can verify it easily from the
above circuit diagram or from the Boolean functions of outputs of Full adder.
• The full adder circuit construction can also be represented in a Boolean
expression.
Sum:
• Perform the XOR operation of input A and B.
• Perform the XOR operation of the outcome with carry. So, the sum is (A XOR B)
XOR Cin which is also represented as:
(A ⊕ B) ⊕ Cin
Carry:
• Perform the 'AND' operation of input A and B.
• Perform the 'XOR' operation of input A and B.
• Perform the 'OR' operations of both the outputs that come from the previous
two steps. So the 'Carry' can be represented as:
A.B + (A ⊕ B) Cin
Arithmetic Circuits- Full Adder
Fig: Symbol and Logic Circuit Diagram of Full Adder
It can be noted that full adder is formed by two half adder circuits and an OR gate.
Differences between Half Adder Vs Full Adder
Sl.No Half Adder Full Adder
1 Half Adder is combinational logic Full adder is combinational logical circuit
circuit which adds two 1-bit digits. that performs an addition operation on
The half adder produces a sum of the three one-bit binary numbers. The full
two inputs. adder produces a sum of the three inputs
and carry value.
• The above is the symbol of the EX-OR gate. In the above diagram, 'A' and 'B'
are the inputs, and 'Diff' is the final outcome after performing the XOR
operation of both numbers.
• The truth table of the EX-OR gate is as follows:
• From the above table, it is clear that the XOR Gate gives the result 1 when both
of the inputs are different.
• When both of the inputs are the same, the XOR gives the result 0.
Arithmetic Circuits- Half Subtractor
2) 2-input AND gate:
• The XOR gate is unable to generate the carry bit. For this purpose, we use
another gate called AND gate. The AND gate is not enough to give the correct
result of 'Borrow'. We will use the NOT gate with the 'AND' gate to get the
correct result.
From the above table, it is clear that the AND gate gives the result 1 when both of
the inputs are 1. When both of the inputs are different and 0, the AND gates
gives the result 0.
3) NOT or Inverter Gate:
The NOT gate is used to get the inverse output. We can combine the 'AND' and
'NOT' gates in order to get the combinational gate 'NAND'. By inverting the
input 'A' using 'NOT' gate and then use the output of the 'NOT' gate as the
input of the 'AND' gate, we can get the 'Borrow' bit.
Arithmetic Circuits- Half Subtractor
Truth Table of NOT Gate:
• The 'A' and 'B' are the augend, and addend bits are defined by the subscript
numbers. The subscripts start from right to left, and the lower-order bit is
defined by subscript '0'.
• The C0, C1, C2, and C3 are the carry inputs which are connected together as a
chain using Full Adder. The C4 is the carry output produced by the last Full-
Adder.
• The Cout of the first Adder is connected as the Cin of the next Full-Adder.
N Bit Parallel Adder
4-bit Binary Adder:
• The S0, S1, S2, and S3 are the sum outputs that produce the sum of augend
and addend bits.
• The inputs for the input variable 'A' and 'B' are fetched from different source
registers. For example, the bit for the input variable 'A' comes from register
'R1', and a bit for the input variable 'B' comes from register 'R2'.
• The outcome produced by adding both input variables is stored into either
third register or to one of the source registers.
• Like a 4-bit parallel adder, can be constructed by cascading four full-adder
circuits.
• In the circuit A0 and B0 represent the LSB of the four bit words A and B where
Full Adder-0 is the lowest stage.
• Hence its Cin has been permanently made 0.
• The rest of the connections are exactly same as those of n-bit parallel adder.
• The four bit parallel adder is a very common logic circuit.
N Bit Parallel Subtractor
N-Bit Parallel Subtractor:
• The subtraction can be carried out by taking the 1’s or 2’s complement of the
number to be subtracted.
• For example, the subtraction (A-B) can be performed by adding either 1’s or 2’s
complement of B to A.
• So, a binary adder can be used to perform the binary subtraction.
• Just as a parallel binary adder can be implemented by cascading several full
adders, a parallel binary subtractor can also be implemented by cascading
several full subtractors.
Like a 4 – bit binary parallel subtractor that subtracts a 4 – bit number Y3 Y2 Y1 Y0
from another 4 – bit number X3 X2 X1 X0 will have 4 difference outputs and
borrow output (Bout).
The Bin of the LSB full subtractor is connected to 0 and Bout of previous full
subtractor is connected to Bin of next full subtractor.
N Bit Parallel Subtractor
A 4-bit parallel subtractor can be shown by the following block diagram:
Fig:
N Bit Parallel Subtractor
Advantages of parallel Adder/Subtractor :
• The parallel adder/subtractor performs the addition operation faster as
compared to serial adder/subtractor.
• Time required for addition does not depend on the number of bits.
• The output is in parallel form i.e all the bits are added/subtracted at the same
time.
• It is less costly.
Disadvantages of parallel Adder/Subtractor :
• Each adder has to wait for the carry which is to be generated from the previous
adder in chain.
• The propagation delay( delay associated with the travelling of carry bit) is
found to increase with the increase in the number of bits to be added.
Combinational Circuit- Multiplexer
Multiplexer:
• A multiplexer is a combinational circuit that has 2n input lines and a single
output line.
• Simply, the multiplexer is a multi-input and single-output combinational
circuit.
• The binary information is received from the input lines and directed to the
output line.
• On the basis of the values of the selection lines, one of these data inputs will
be connected to the output.
• Unlike encoder and decoder, there are n selection lines and 2n input lines.
• So, there is a total of 2N possible combinations of inputs.
• A multiplexer is also treated as Mux.
There are various types of the multiplexer which are as follows:
1) 2 x 1 Multiplexer
2) 4×1 Multiplexer
3) 8 ×1 multiplexer
4) 16 x 1 Multiplexer
Combinational Circuit- Multiplexer
2×1 Multiplexer:
• In 2×1 multiplexer, there are only two inputs, i.e., A0 and A1, 1 selection line,
i.e., S0 and single outputs, i.e., Y.
• On the basis of the combination of inputs which are present at the selection
line S0, one of these 2 inputs will be connected to the output.
• The block diagram and the truth table of the 2×1 multiplexer are given below.
Block Diagram:
Combinational Circuit- Multiplexer
Truth Table:
Figure:Truth table of OR
Realization of logic functions using universal gates(NAND and NOR
Gate)
1.4)NAND gates as Ex-OR gate:
• The output of a two input Ex-OR gate is shown by: Y = A’B + AB’. This can be
achieved with the logic diagram shown in the left side.
Realization of logic functions using universal gates(NAND and NOR
Gate)
Figure:NAND gates as Ex-OR gate
Figure:Truth table of OR
Realization of logic functions using universal gates(NAND and NOR
Gate)
2.3)NOR gates as AND gate:
From DeMorgan’s theorems:
(A+B)’ = A’B’
(A’+B’)’ = A’’B’’ = AB
So, give the inverted inputs to a NOR gate, obtain AND operation at output.
Figure: NOR gates as AND gate Figure-1:Truth table of AND
Realization of logic functions using universal gates(NAND and NOR
Gate)
2.4)NOR gates as Ex-NOR gate:
• The output of a two input Ex-NOR gate is shown by: Y = AB + A’B’. This can be
achieved with the logic diagram shown in the left side.
Realization of logic functions using universal gates(NAND and NOR
Gate)
Figure: NOR gates as Ex-NOR gate
The logical expression of the term Y0, Y1, Y2, and Y3 is as follows:
Y3=E.A1.A0 Y2=E.A1.A0‘ Y1=E.A1'.A0 Y0=E.A1'.A0‘
Logical circuit of the above expressions is given below:
Encoder & Decoder
3 to 8 line decoder:
• The 3 to 8 line decoder is also known as Binary to Octal Decoder.
• In a 3 to 8 line decoder, there is a total of eight outputs, i.e., Y0, Y1, Y2, Y3, Y4, Y5,
Y6, and Y7 and three outputs, i.e., A0, A1, and A2.
• This circuit has an enable input 'E'. Just like 2 to 4 line decoder, when enable 'E'
is set to 1, one of these four outputs will be 1.
• The block diagram and the truth table of the 3 to 8 line encoder are given
below.
Block Diagram:
Encoder & Decoder
Truth Table:
The logical expression of the term Y0, Y1, Y2, Y3, Y4, Y5, Y6, and Y7 is as follows:
Y0=A0'.A1'.A2‘ Y1=A0.A1'.A2‘ Y2=A0'.A1.A2‘ Y3=A0.A1.A2'
Y4=A0'.A1'.A2 Y5=A0.A1'.A2 Y6=A0'.A1.A2 Y7=A0.A1.A2
Encoder & Decoder
Logical circuit of the above expressions is given below:
Encoder & Decoder
4 to 16 line Decoder:
• In the 4 to 16 line decoder, there is a total of 16 outputs, i.e., Y0, Y1, Y2,……,
Y16 and four inputs, i.e., A0, A1, A2, and A3.
• The 4 to 16 line decoder can be constructed using either 2 to 4 decoder or 3 to
8 decoder.
• There is the following formula used to find the required number of lower-order
decoders.
• Required number of lower order decoders=m2/m1 m1 = 8 m2 = 16
• Required number of 3 to 8 decoders=16/8=2
Block Diagram:
Encoder & Decoder
Truth Table:
Encoder & Decoder
The logical expression of the term Y0, Y1, Y2,…, Y15 are as follows:
Y0=A0'.A1'.A2'.A3'
Y1=A0'.A1'.A2'.A3
Y2=A0'.A1'.A2.A3'
Y3=A0'.A1'.A2.A3
Y4=A0'.A1.A2'.A3'
Y5=A0'.A1.A2'.A3
Y6=A0'.A1.A2.A3'
Y7=A0'.A1.A2.A3
Y8=A0.A1'.A2'.A3'
Y9=A0.A1'.A2'.A3
Y10=A0.A1'.A2.A3'
Y11=A0.A1'.A2.A3
Y12=A0.A1.A2'.A3'
Y13=A0.A1.A2'.A3
Y14=A0.A1.A2.A3'
Y15=A0.A1.A2'.A3