Unit-3 ppt-1
Unit-3 ppt-1
Sum = A‘B+AB'
Carry = AB
Logic Diagram for half Adder
Half Adder is also designed by combining the 'XOR' and 'AND' gates
and provide the sum and carry.
A . 𝐴𝐵
𝐴𝐵
B. 𝐴𝐵
𝐴𝐵
Sum (S)=A+ B= A+ B+
= A+)+ B+)=A. + B. =
Carry (C)=AB=
Implementation of Half Adder using NOR gates : Total 5 NOR gates are required to
implement half adder.
Sum (S)=A+ B= A+ B+
= A+)+ B+)= +B)(+)
=
Carry (C)=AB= =
Limitation of Half Adder-
Truth Table
Block diagram
The full adder logic circuit can be constructed using the 'AND' and the ‘XOR’ gate with an OR
gate.
K-maps using for Full Adder
Sum = x' y' z+x' yz+xy' z'+xyz
Carry=X’YCin+XY’Cin+XYCin’+XYCin
The SOP form can be obtained with the help of K-map as:
Sum = x' y' z+x' yz+xy' z'+xyz
Carry = xy+xz+yz
Implementation of Full Adder using NAND gates:
A ⊕ B=
Where S= A ⊕ B ⊕=
= (A ⊕ B )+AB=
Implementation of Full Adder using NOR gates:
A ⊕ B=
Where S= A ⊕ B ⊕
=
= (A ⊕ B )+AB==
Half Subtractor
Half subtractor is a combination circuit with two inputs and two outputs that
are different and borrow. It produces the difference between the two binary bits at the
input and also produces an output (Borrow) to indicate if a 1 has been borrowed. In the
subtraction (A-B), A is called a Minuend bit and B is called a Subtrahend bit.
A full-subtractor is a combinational circuit that has three inputs A, B, bin and two
outputs d and b. Where, A is the minuend, B is subtrahend, b in is borrow produced by
the previous stage, d is the difference output and b is the borrow output.
Truth Table
Block diagram
Difference,d=A⊕B⊕bin=A′B′bin+AB′b′in+A′Bb′in+Abbin
Borrow,b=A′B′bin+A′Bb′in+A′Bbin+ABbin
Or
Borrow,b=A′B(bin+b′in)+(AB+A′B′)bin=A′B+(A⊕B)′bin
K-maps using for Full Subtractor
The full subtractor logic circuit can be constructed using the 'AND', '
XOR', and NOT gate with an OR gate.
Implementation of Full Subtractor using NAND gates:
K-Map
+
• The two BCD numbers, together
with input carry, are first added in
the top 4-bit binary adder to
produce a binary sum.
• When the output carry is equal to
zero (i.e. when sum ≤ 9 and Cout =
0) nothing (zero) is added to the
binary sum.
• When it is equal to one (i.e. when
sum > 9 or Cout = 1), binary 0110 is
added to the binary sum through
the bottom 4-bit binary adder.
• The output carry generated from
the bottom binary adder can be
ignored, since it supplies
information already available at
the output-carry terminal.
Code converter
The Code converter is used to convert one type of binary code to another. There are
different types of binary codes like BCD code, gray code, excess-3 code, etc. Different
codes are used for different types of digital applications.
• Binary to BCD code converter
• BCD to Excess-3 code converter
• BCD to Gray code converter
• Gray code to Excess-3 code converter
Binary – BCD Convertor
𝐵5
𝐵4
𝐵3
𝐵2
𝐵1
BCD to Excess-3 code converter
In the k-map shown above for E0 output, although 2 to 3 pairs of cells can be grouped,
all the minterms are marked as isolated cells to make simplification easier.
In the k-map shown above for E0 output, although 2 to 3 pairs of cells can be
grouped, all the minterms are marked as isolated cells to make simplification
easier.
𝐺1
𝐺2
𝐺3
𝐺4
Decoder
The combinational circuit that change the binary information into 2 N output lines is known
as Decoders. The binary information is passed in the form of N input lines. The output lines
define the 2N-bit code for the binary information. In simple words, the Decoder performs
the reverse operation of the Encoder. At a time, only one input line is activated for
simplicity. The produced 2N-bit output code is equivalent to the binary information.
Block Diagram:
Implementation of 4 to 16 decoder using 2
to 4 decoders
Truth Table:
4 to 2 Encoder
Let 4 to 2 Encoder has four inputs Y3, Y2, Y1 & Y0 and two outputs A1 & A0. The block
diagram of 4 to 2 Encoder is shown in the following figure.
Inputs Outputs
Y3 Y2 Y1 Y0 A1 A0
0 0 0 1 0 0
0 0 1 0 0 1
0 1 0 0 1 0
1 0 0 0 1 1
From Truth table, we can write the Boolean functions for each output as
8 to 3 line Encoder:
Octal to Binary Encoder
Octal to binary Encoder has eight inputs, Y7 to Y0 and three outputs A2, A1 & A0. Octal to
binary encoder is nothing but 8 to 3 encoder. The block diagram of octal to binary
Encoder is shown in the following figure.
Inputs Outputs
Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 A2 A1 A0
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
From Truth table, we can write the Boolean functions for each output as
Decimal to BCD Encoder
In this priority encoder, there are total of 4 inputs, i.e., Y 0, Y1, Y2, and Y3, and two
outputs, i.e., A0 and A1. The Y3 has high and Y0 has low priority inputs. When more
than one input is '1' at the same time, the output will be the (binary) code
corresponding to the higher priority input. Below is the truth table of the 4 to 2 line
priority encoder.
Lowest Priority
Highest Priority
A1=Y3+Y2
A0=Y3+Y2'.Y1
Multiplexers
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 2 n input lines. So, there is a
total of 2N possible combinations of inputs. A multiplexer is also treated as Mux.
2×1 Multiplexer:
In 2×1 multiplexer, there are only two inputs, i.e., A 0 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 logical expression of the term Y is as follows:
Y=S0'.A0+S0.A1
4×1 Multiplexer:
In the 4×1 multiplexer, there is a total of four inputs, i.e., A 0, A1, A2, and A3, 2 selection
lines, i.e., S0 and S1 and single output, i.e., Y. On the basis of the combination of inputs
that are present at the selection lines S0 and S1, one of these 4 inputs are connected to
the output. The block diagram and the truth table of the 4×1 multiplexer are given
below.
The logical expression of the term Y is as follows:
Y=S1' S0' A0+S1' S0 A1+S1 S0' A2+S1 S0 A3
8 to 1 Multiplexer
In the 8 to 1 multiplexer, there are total eight inputs, i.e., A 0, A1, A2, A3, A4, A5, A6, and
A7, 3 selection lines, i.e., S0, S1and S2 and single output, i.e., Y. On the basis of the
combination of inputs that are present at the selection lines S 0, S1, and S2, one of these
8 inputs are connected to the output. The block diagram and the truth table of the 8×1
multiplexer are given below.
The logical expression of the term Y is as follows:
Y=S0'.S1'.S2'.A0+S0.S1'.S2'.A1+S0'.S1.S2'.A2+S0.S1.S2'.A3+S0'.S1'.S2 A4+S0.S1'.S2 A5+S0'.S1.S2 .A
6+S0.S1.S3.A7
8 ×1 multiplexer using 4×1 and 2×1 multiplexer
Implement the 8×1 multiplexer using a lower order multiplexer. To implement the
8×1 multiplexer, we need two 4×1 multiplexers and one 2×1 multiplexer. The 4×1
multiplexer has 2 selection lines, 4 inputs, and 1 output. The 2×1 multiplexer has
only 1 selection line.
For getting 8 data inputs, we need two 4×1 multiplexers. The 4×1 multiplexer
produces one output. So, in order to get the final output, we need a 2×1
multiplexer.
16 to 1 Multiplexer
In the 16 to 1 multiplexer, there are total of 16 inputs, i.e., A 0, A1, …, A16, 4 selection
lines, i.e., S0, S1, S2, and S3 and single output, i.e., Y. On the basis of the combination of
inputs that are present at the selection lines S0, S1, and S2, one of these 16 inputs will
be connected to the output. The block diagram and the truth table of the 16×1
Y=A0.S0'.S1'.S2'.S3'+
A1.S0'.S1'.S2'.S3+
A2.S0'.S1'.S2.S3'+
A3.S0'.S1'.S2.S3+
A4.S0'.S1.S2'.S3'+
A5.S0'.S1.S2'.S3+
A6.S0'.S1.S2.S3'+
A7.S0'.S1.S2.S3+
A8.S0.S1'.S2'.S3'+
A9 .S0.S1'.S2'.S3+
A10.S0.S1'.S2.S3'+
A11.S0.S1'.S2.S3+
A12.S0.S1.S2'.S3'+
A13.S0.S1.S2'.S3+
A14.S0.S1.S2.S3'+
16×1 multiplexer using 8×1 and 2×1 multiplexer
We can implement the 16×1 multiplexer using a lower order multiplexer. To implement
the 8×1 multiplexer, we need two 8×1 multiplexers and one 2×1 multiplexer. The 8×1
multiplexer has 3 selection lines, 4 inputs, and 1 output. The 2×1 multiplexer has only
1 selection line.
For getting 16 data inputs, we need two 8 ×1 multiplexers. The 8×1 multiplexer
produces one output. So, in order to get the final output, we need a 2×1 multiplexer.
The block diagram of 16×1 multiplexer using 8×1 and 2×1 multiplexer is given below.
De-multiplexer
A De-multiplexer is a combinational circuit that has only 1 input line and 2 N output lines.
Simply, the multiplexer is a single-input and multi-output combinational circuit. The
information is received from the single input lines and directed to the output line. On the
basis of the values of the selection lines, the input will be connected to one of these
outputs. De-multiplexer is opposite to the multiplexer.
Unlike encoder and decoder, there are n selection lines and 2 n outputs. So, there is a
total of 2n possible combinations of inputs. De-multiplexer is also treated as De-mux.
1×2 De-multiplexer:
The logical expression of the term Y is as follows:
Y0=S0'.A
Y1=S0.A
1×4 De-multiplexer:
In 1 to 4 De-multiplexer, there are total of four outputs, i.e., Y 0, Y1, Y2, and Y3, 2 selection
lines, i.e., S0 and S1 and single input, i.e., A. On the basis of the combination of inputs
which are present at the selection lines S0 and S1, the input be connected to one of the
outputs. The block diagram and the truth table of the 1×4 multiplexer are given below.
The logical expression of the term Y is as follows:
Y0=S1' S0' A
y1=S1' S0 A
y2=S1 S0' A
y3=S1 S0 A
1×8 De-multiplexer
In 1 to 8 De-multiplexer, there are total of eight outputs, i.e., Y 0, Y1, Y2, Y3, Y4, Y5, Y6,
and Y7, 3 selection lines, i.e., S0, S1and S2 and single input, i.e., A. On the basis of the
combination of inputs which are present at the selection lines S 0, S1 and S2, the input
will be connected to one of these outputs. The block diagram and the truth table of
the 1×8 de-multiplexer are given below.
The logical expression of the term Y is as follows:
Y0=S0'.S1'.S2'.A
Y1=S0.S1'.S2'.A
Y2=S0'.S1.S2'.A
Y3=S0.S1.S2'.A
Y4=S0'.S1'.S2 A
Y5=S0.S1'.S2 A
Y6=S0'.S1.S2 A
Y7=S0.S1.S3.A
1×8 De-multiplexer using 1×4 and 1×2 de-multiplexer
We can implement the 1×8 de-multiplexer using a lower order de-multiplexer. To
implement the 1×8 de-multiplexer, we need two 1×4 de-multiplexer and one 1×2 de-
multiplexer. The 1×4 multiplexer has 2 selection lines, 4 outputs, and 1 input. The 1×2
de-multiplexer has only 1 selection line.
1 x 16 De-multiplexer
In 1×16 de-multiplexer, there are total of 16 outputs, i.e., Y 0, Y1, …, Y16, 4 selection lines,
i.e., S0, S1, S2, and S3 and single input, i.e., A. On the basis of the combination of inputs
which are present at the selection lines S0, S1, and S2, the input will be connected to one
of these outputs. The block diagram and the truth table of the 1×16 de-multiplexer are
given below.
The logical
expression of the
term Y is as
follows:
Y0=A.S0'.S1'.S2'.S3'
Y1=A.S0'.S1'.S2'.S3
Y2=A.S0'.S1'.S2.S3'
Y3=A.S0'.S1'.S2.S3
Y4=A.S0'.S1.S2'.S3'
Y5=A.S0'.S1.S2'.S3
Y6=A.S0'.S1.S2.S3'
Y7=A.S0'.S1.S2.S3
Y8=A.S0.S1'.S2'.S3'
Y9=A.S0.S1'.S2'.S3
Y10=A.S0.S1'.S2.S3'
Y11=A.S0.S1'.S2.S3
Y12=A.S0.S1.S2'.S3'
Y13=A.S0.S1.S2'.S3
Y14=A.S0.S1.S2.S3'
Y =A.S .S .S '.S
1×16 de-multiplexer using 1×8 and 1×2 de-multiplexer
We can implement the 1×16 de-multiplexer using a lower order de-multiplexer. To
implement the 1×16 de-multiplexer, we need two 1×8 de-multiplexer and one 1×2
de-multiplexer. The 1×8 multiplexer has 3 selection lines, 1 input, and 8 outputs. The
1×2 de-multiplexer has only 1 selection line.