4_Combinational Logic Circuit
4_Combinational Logic Circuit
Some decoders do not utilize all of the 2N possible input codes but only certain ones. For example,
a BCD-to-decimal decoder has a four-bit input code and ten output lines that correspond to the ten
BCD code groups 0000 through 1001. Decoders of this type are often designed so that if any of the
unused codes are applied to the input, none of the outputs will be activated.
Applications of Decoder
Decoders are used for code conversions.
Decoders are extensively used in memory systems of computers.
Decoders are also used in data routing applications where very short propagation
delay is required.
Decoder may also be used for timing or sequencing purposes.
Decoders are also utilized to turn on and off digital devices at a specific time.
Binary to Octal Decoder
Logic Diagram of Decoder
Combinational Logic Implementation
A decoder provides the 2n minterms of n input variables.
Each asserted output of the decoder is associated with a unique pattern of input bits.
Since any Boolean function can be expressed in sum-of-minterms form, a decoder
that generates the minterms of the function, together with an external OR gate that
forms their logical sum, provides a hardware implementation of the function.
In this way, any combinational circuit with n inputs and m outputs can be
implemented with an n -to-2n -line decoder and m OR gates.
A decoder is then chosen such that it generates all the minterms of the input
variables. The inputs to each OR gate are selected from the decoder outputs
according to the list of minterms of each function.
Combinational Logic Implementation
From truth table of the full adder, we obtain the functions for the combinational circuit in
sum-of-minterms form:
S(x, y, z) = (1, 2, 4, 7)
C(x, y, z) = (3, 5, 6, 7)
Since there are three inputs and a total of eight
minterms, we need a three-to-eight-line
decoder.
The implementation is shown in the figure
Decoder generates the eight minterms for
x, y, and z.
The OR gate for output S forms the logical sum of
minterms 1, 2, 4, and 7.
The OR gate for output C forms the logical sum of
minterms 3, 5, 6, and 7.
Multiplexer
A multiplexer is a combinational circuit that selects binary information from
one of many input lines and directs it to a single output line. The selection of a
particular input line is controlled by a set of selection lines. Normally, there
are 2n input lines and n selection lines whose bit combinations determine
which input is selected.
A two-to-one-line multiplexer connects one of two 1-bit sources to a common
destination, as shown in the figure. The circuit has two data input lines, one
output line, and one selection line S . When S = 0, the upper AND gate is
enabled and I0 has a path to the output. When S = 1,the lower AND gate is
enabled and I1 has a path to the output. The multiplexer acts like an electronic
switch that selects one of two sources.
Multiplexer
The block diagram of a multiplexer is sometimes depicted by a wedge-shaped symbol, as
shown in the figure. It suggests visually how a selected one of multiple data sources is directed
into a single destination. The multiplexer is often labeled “MUX” in block diagrams.
For example, a modern home stereo system may have a switch that selects music from one of
four sources: a cassette tape, a compact disc (CD), a radio tuner, or an auxiliary input such as
audio from a VCR or DVD. The switch selects one of the electronic signals from one of these
four sources and sends it to the power amplifier and speakers. In simple terms, this is what a
multiplexer (MUX) does: it selects one of several input signals and passes it on to the output.
Four-Input Multiplexer
Here, four inputs are selectively
transmitted
to the output according to the four possible
combinations of the S1, S0 select inputs.
Each data
input is gated with a different combination
of select input levels. I0 is gated with S1 and
S0 so that I0 will pass through its AND gate
to output Z only when S1 = 0 and S0 = 0 .
The table in the figure gives the outputs for
the other three input-select codes.
Application of Multiplexer
Multiplexer circuits find numerous and varied applications in digital systems of all types.
These applications include-
data selection,
data routing,
operation sequencing,
parallel-to-serial conversion,
waveform generation and
logic-function generation.
Demultiplexer
A multiplexer takes several inputs and transmits one of
them to the output. A demultiplexer (DEMUX) performs
the reverse operation: it takes a single input and distributes
it over several outputs.
Figure shows the functional diagram for a digital
demultiplexer.
The large arrows for inputs and outputs can represent one or
more lines. The select input code determines to which
output the DATA input will be transmitted. In other words,
the demultiplexer takes one input data source and
selectively distributes it to 1 of N output channels just like a
multiposition switch.
1 to 4 line Demultiplexer
Selection Input Outputs
S1 S0 Y3 Y2 Y1 Y0
0 0 0 0 0 I
0 1 0 0 I 0
1 0 0 I 0 0
1 1 I 0 0 0
First, find the number of input variables. If it’s 3 variable functions, then we need a 1:8
multiplexer. If it’s an n variable function, we require a 1:2n multiplexer.
Put the variables as selector lines of the multiplexer. A 1:2n multiplexer will have n
selector lines.
Now, from the truth table of the function, find the minterms and grab the corresponding
output lines of the demultiplexer, and put them into an OR gate. This makes sure that
whenever any minterm of the function is high, the output is high.
Full Adder Using Demultiplexer
Full Adder is a combinatorial circuit that computes the sum and carries out two input bits
and an input carry. So it has three inputs – the two bits A and B, and the input carry Cin, and
two outputs – sum, S and output carry, Cout.
Truth table of full adder is given below:
Input Outputs
A B Carry in, Cin Sum, S Carry out, Cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Full Adder Using Demultiplexer
From the truth table, we can write
S(A, B, Cin) = ∑(1,2,4,7)
Cout(A, B, Cin) = ∑(3,5,6,7)
which is,
S(A, B, Cin)= (A’B’ Cin) + (A’B Cin’) + (AB’ Cin’) +(AB Cin)
Cout(A, B, Cin) = (A’B Cin) + (AB’ Cin) + (AB Cin’) + (AB Cin)
Full Adder Using Demultiplexer
We have two outputs and therefore two
functions S and Cout. Clearly, we need
to use a 1:8 demultiplexer.
Firstly, we have to set the input line =
1.
Using the above steps, we see that for
S: we need to put line numbers 1, 2, 4,
and 7 of the demultiplexer to an OR
gate. For the C-out: we have an OR
gate, the lines 3, 5, 6, and 7.
Boolean function implementation using multiplexer
A Boolean function of n variables can be implemented with a multiplexer that has n - 1
selection inputs.
The first n - 1 variables of the function are connected to the selection inputs of the
multiplexer.
The remaining single variable of the function is used for the data inputs.
If the single variable is denoted by z , each data input of the multiplexer will be z , z’, 1, or
0.
Boolean function implementation using multiplexer
To demonstrate this procedure, consider the Boolean function: F
(x, y, z) = ⅀(1, 2, 6, 7)
F (x, y, z) = x’y’z + x’yz’+ xyz’ + xyz
This function of three variables can be implemented with a four-
to-one-line multiplexer as shown in the figure.
The two variables x and y are applied to the selection lines in that
order; x is connected to the S1 input and y to the S0 input. The
values for the data input lines are determined from the function.
When xy = 00, output F is equal to data input line 0. This
requires that variable z be applied to data input 0. The operation
of the multiplexer is such that when xy = 00, data input 0 has a
path to the output, and that makes F equal to z .
In a similar fashion, we can determine the required input to data
lines 1, 2, and 3 from the value of F when xy = 01, 10, and 11,
respectively.