ADE 4th Module
ADE 4th Module
ADE 4th Module
Half Adder
The half adder circuit has two inputs: A and B, which add two input digits and generates a carry and
a sum.
So, coming to the scenario of half adder, it adds two binary digits where the input bits are termed as
augend and addend and the result will be two outputs one is the sum and the other is carry. To
perform the sum operation, XOR is applied to both the inputs, and AND gate is applied to both inputs
to produce carry.
The carry output is 0 unless both inputs are 1. The S output represents the least significant bit of the
sum.
The simplified Boolean functions for the two outputs can be obtained directly from the truth table.
The simplified sum of products expressions are
To obtain the implementation of Fig 4-2(c) we note that S is the exclusive OR of x and y. The
complement of S is the equivalence of x and y.
In fig 4-2(d) we use the product of sums implementation with C derived as follows:
The half adder can be implemented with an exclusive OR and an AND gate as shown in fig (e)
Full Adder
This adder is difficult to implement when compared to half-adder.
The output carry is designated as C-OUT and the normal output is represented as S which is ‘SUM’.
With the above full adder truth-table, the implementation of a full adder circuit can be understood
easily.
Fig shows the implementation of a full adder in sum of products
Subtractor:
Half subtractor
The half-subtractor subtracts two bits and produces an output as difference and borrow. It needs two
binary inputs(subtrahend bit and minuend bit), two binary outputs(difference and borrow) and
combination of logic circuit.
As you can see above, if the minuend bit is higher than the subtrahend bit, difference output is
produced with no borrow. If the subtrahend bit is higher than the minuend bit, difference output is
produced with borrow.
The boolean expression for the outputs of half-subtractor can be determined by constructing a truth
table. The truth table for half adder is shown below.
The obtained boolean expression for difference output is an Ex-OR gate output. The Logic circuit
diagram for a half subtractor circuit is draw from the boolean expression.
Full subtractor
Full subtractor
A full subtractor has three binary inputs(subtrahend, minuend and one borrow bit from the previous
subtraction operation). It produces two binary outputs(difference and borrow) using a combination
of logic gates. The borrow given to the previous subtraction operation is denoted as Bin
In full subtractor, eight possible operations are possible with three inputs and produces eight, two
digit outputs. The operation is shown in the truth table below.
The Boolean expression for difference output can further be simplified as follows.
Now we have two boolean expressions for difference and borrow output. With those expressions, the
combinational circuit for full subtractor is implemented.
Multiplexers:
The multiplexer or MUX is a digital switch, also called as data selector. It is a Combinational Logic
Circuit with more than one input line, one output line and more than one select line. It accepts the
binary information from several input lines or sources and depending on the set of select lines, a
particular input line is routed onto a single output line.
S0 S1 D0 D1 D2 D3 Y
0 0 0 X X X 0
0 0 1 X X X 1
0 1 X 0 X X 0
0 1 X 1 X X 1
1 0 X X 0 X 0
1 0 X X 1 X 1
1 1 X X X 0 0
1 1 X X X 1 1
From the above truth table, we can write the output expressions as follows:
Y = S0 S1 D0 + S0 S1 D1 + S0 S1 D2 + S0 S1 D3
From the above expression of the output, a 4-to-1 multiplexer can be implemented by using basic
logic gates. The below figure shows the logic circuit of 4:1 MUX which is implemented by four 3-
inputs AND gates, two 1-input NOT gates, and one 4-inputs OR gate.
In this circuit, each data input line is connected as input to an AND gate and two select lines are
connected as other two inputs to it. Additionally, there is also an Enable Signal. The output of all the
AND gates are connected to inputs of OR gate in order to produce the output Y.
The below figure shows the block diagram of an 8-to-1 multiplexer with enable input that can enable
or disable the multiplexer. Since the number data bits given to the MUX are eight, then 3 bits (23 = 8)
are needed to select one of the eight data bits.
The truth table for an 8-to1 multiplexer is given below with eight combinations of inputs so as to
generate each output corresponds to input.
S0 S1 S2 D0 D1 D2 D3 D4 D5 D6 D7 Y
0 0 0 0 X X X X X X X 0
0 0 0 1 X X X X X X X 1
0 0 1 X 0 X X X X X X 0
0 0 1 X 1 X X X X X X 1
0 1 0 X X 0 X X X X X 0
0 1 0 X X 1 X X X X X 1
0 1 1 X X X 0 X X X X 0
0 1 1 X X X 1 X X X X 1
1 0 0 X X X X 0 X X X 0
1 0 0 X X X X 1 X X X 1
1 0 1 X X X X X 0 X X 0
1 0 1 X X X X X 1 X X 1
1 1 0 X X X X X X 0 X 0
1 1 0 X X X X X X 1 X 1
1 1 1 X X X X X X X 0 0
1 1 1 X X X X X X X 1 1
From the above truth table, the Boolean equation for the output is given as:
Y = S0 S1 S2 D0 + S0 S1 S2 D1 + S0 S1 S2 D2 + S0 S1 S2 D3 + S0 S1 S2 D4 + S0 S1 S2 D5 + S0 S1 S2 D6 +
S0 S1 S2 D7
From the above Boolean equation, the logic circuit diagram of an 8-to-1 multiplexer can be
implemented by using 8 AND gates, 1 OR gate and 7 NOT gates as shown in below figure. In the
circuit, when enable pin is set to one, the multiplexer will be disabled and if it is zero, then select
lines will select the corresponding data input to pass through the output.
Demultiplexer means one to many. A demultiplexer is a circuit with one input and many outputs. By
applying control signal, we can steer any input to the output. Few types of demultiplexer are 1-to 2,
1-to-4, 1-to-8 and 1-to 16 demultiplexer.
Following figure illustrate the general idea of a demultiplexer with 1 input signal, m control signals,
and n output signals.
The 1-to-4 demultiplexer has 1 input bit, 2 control or select bits, and 4 output bits. An example of 1-
to-4 demultiplexer is IC 74155. The 1-to-4 demultiplexer is shown in figure below-
The input bit is labelled as Data D. This data bit is transmitted to the selected output lines, which
depends on the values of A and B, the control or Select Inputs.
When A B = 0 1 , the second AND gate from the top is enabled while other AND gates are disabled.
Therefore, data bit D is transmitted to the output Y1, giving Y1 = Data.
If D is LOW, Y1 is LOW. If D is HIGH, Y1 is HIGH. The value of Y1 depends upon the value of D. All
other outputs are in low state.
If the control input is changed to A B = 1 0 , all the gates are disabled except the third AND gate
from the top. Then, D is transmitted only to the Y2 output, and Y2 = Data.
Truth Table –
D7 D6 D5 D4 D3 D2 D1 D0 X Y Z
0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 0 0 0 1
0 0 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 1
0 0 0 1 0 0 0 0 1 0 0
0 0 1 0 0 0 0 0 1 0 1
0 1 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 1 1 1
As seen from the truth table, the output is 000 when D0 is active; 001 when D1 is active; 010 when
D2 is active and so on.
Implementation –
From the truth table, the output line Z is active when the input octal digit is 1, 3, 5 or 7. Similarly, Y is
1 when input octal digit is 2, 3, 6 or 7 and X is 1 for input octal digits 4, 5, 6 or 7. Hence, the Boolean
functions would be:
X = D4 + D5 + D6 + D7
Y = D2 +D3 + D6 + D7
Z = D1 + D3 + D5 + D7
Decoders:
A decoder does the opposite job of an encoder. It is a combinational circuit that converts n lines of
input into 2n lines of output.
3 to 8 line decoder
Truth Table –
X Y Z D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
Implementation –
D0 is high when X = 0, Y = 0 and Z = 0. Hence,
D0 = X’ Y’ Z’
Similarly,
D1 = X’ Y’ Z
D2 = X’ Y Z’
D3 = X’ Y Z
D4 = X Y’ Z’
D5 = X Y’ Z
D6 = X Y Z’
D7 = X Y Z
Hence,