2. UNIT IV: CONTENTS
Multiplexer, De-multiplexer,ALU, Encoder and Décoder:
Introduction,
Multiplexer,De-multiplexer,
Encoder, Décoder,
ALUs
Sequential Circuits: Flip-Flop:
Introduction,Terminologies used, S-R flip-flop,D flip-fop,JK flip-flop,
Race-around condition,
Master – slave JK flip-flop,
T flip-flop,
conversion from one type of flip-flop to another,
Application of flip-flops
C
H
A
P
T
E
R
I
C
H
A
P
T
E
R
II
4. COMBINATIONAL LOGIC CIRCUIT: MULTIPLEXER
Multiplexer is a special type of combinational circuit.
There are n-data inputs, one output and m select inputs with 2m = n.
It is a digital circuit which selects one of the n data inputs and routes
it to the output.The selection of one of the n inputs is done by the
selected inputs.
Depending on the digital code applied at the selected inputs, one out
of n data sources is selected and transmitted to the single outputY.
E is called the strobe or enable input which is useful for the
cascading. It is generally an active low terminal that means it will
perform the required operation when it is low.
Block diagram
5. COMBINATIONAL LOGIC CIRCUIT: MULTIPLEXER
Basic Multiplexing Switch Multiplexer Input Line SelectionMultiplexer Symbol
Generally the number of data inputs to a multiplexer is a power of two such as 2, 4, 8, 16, etc. Some of the mostly
used multiplexers include 2-to-1, 4-to-1, 8-to-1 and 16-to-1 multiplexers.
These multiplexers are available in IC forms with different input and select line configurations. Some of the available
multiplexer ICs include 74157 (2-to-1 MUX), 78158 (2-to-1 MUX), 74352 (4-to-1 MUX), 74153 (4-to-1 MUX),
74152 (8-to-1 MUX) and 74150 (16-to-1 MUX).
6. COMBINATIONAL LOGIC CIRCUIT: MULTIPLEXER: 2 : 1 MULTIPLEXER
Block diagram TruthTableCircuit diagram
The 2 : 1 multiplexer has 2 inputs and 1 control signal.
7. COMBINATIONAL LOGIC CIRCUIT: MULTIPLEXER: 4 : 1 MULTIPLEXER
Block diagram TruthTable
The 4 : 1 multiplexer has 4 inputs and 2 control signals.
When Enable(E) = 1
Circuit diagram
8. COMBINATIONAL LOGIC CIRCUIT: MULTIPLEXER: 8 : 1 MULTIPLEXER
An 8-to-1 multiplexer consists of eight data inputs D0 through D7, three input select lines S2 through S0 and a single
output lineY. Depending on the select lines combinations, multiplexer decodes the inputs.
Block diagram TruthTable
When Enable(E) = 1
Circuit diagram
9. COMBINATIONAL LOGIC CIRCUIT: MULTIPLEXER: 16 : 1 MULTIPLEXER
The 16 : 1 multiplexer has 16 inputs and 4 control signals.
It can be implemented with two 8 : 1 multiplexers:
A B C D Y(Output)
0 0 0 0 D1
0 0 0 1 D2
0 0 1 0 D3
0 0 1 1 D4
0 1 0 0 D5
0 1 0 1 D6
0 1 1 0 D7
0 1 1 1 D8
1 0 0 0 D9
1 0 0 1 D10
1 0 1 0 D11
1 0 1 1 D12
1 1 0 0 D13
1 1 0 1 D14
1 1 1 0 D15
1 1 1 1 D16
Block diagram
Circuit diagram
TruthTable When Enable(E) = 1
10. COMBINATIONAL LOGIC CIRCUIT: DEMULTIPLEXER
A demultiplexer performs the reverse operation of a multiplexer i.e.
it receives one input and distributes it over several outputs.
It has only one input, n outputs, m select input.
At a time only one output line is selected by the select lines and the
input is transmitted to the selected output line.
A de-multiplexer is equivalent to a single pole multiple way switch
as shown in fig.
Demultiplexers comes in multiple variations.
1 : 2 demultiplexer
1 : 4 demultiplexer
1 : 16 demultiplexer
1 : 32 demultiplexer
11. COMBINATIONAL LOGIC CIRCUIT:DEMULTIPLEXER
The demultiplexer is a combinational logic circuit designed to switch one common input line to one of several
seperate output line.
The demultiplexer takes one single input data line and then switches it to any one of a number of individual output
lines one at a time.The demultiplexer converts a serial data signal at the input to a parallel data at its output
lines as shown below.
The Demultiplexer Symbol Demultiplexer Output Line SelectionChannel De-multiplexer
12. COMBINATIONAL LOGIC CIRCUIT: DEMULTIPLEXER: 1:2 DEMULTIPLEXER
A 1-to-2 demultiplexer consists of one input line, two output lines and one select line.The signal on the select
line helps to switch the input to one of the two outputs.
Block diagram TruthTable When Enable(E) = 1Circuit diagram
13. COMBINATIONAL LOGIC CIRCUIT: DEMULTIPLEXER: 1:4 DEMULTIPLEXER
A 1-to-4 demultiplexer has a single input (D), two selection lines (S1 and S0) and four outputs (Y0 toY3).The
input data goes to any one of the four outputs at a given time for a particular combination of select lines.
Block diagram TruthTable When Enable(E) = 1Circuit diagram
14. COMBINATIONAL LOGIC CIRCUIT: DEMULTIPLEXER: 1:8 DEMULTIPLEXER
A 1-to-4 demultiplexer has a single input (D), two selection lines (S1 and S0) and four outputs (Y0 toY3).The
input data goes to any one of the four outputs at a given time for a particular combination of select lines.
Block diagram TruthTable When Enable(E) = 1Circuit diagram
15. APPLICATIONS OF MULTIPLEXER AND DEMULTIPLEXER
Communication System – A Multiplexer is used
in communication systems, which has a transmission
system and also a communication network.A
Multiplexer is used to increase the efficiency of the
communication system by allowing the transmission
of data, such as audio & video data from different
channels via cables and single lines.
Transmission from the Computer System of
a Satellite: A Multiplexer is used to transmit the
data signals from the computer system of a satellite
to the ground system by using a GSM
communication.
16. APPLICATIONS OF MULTIPLEXER AND DEMULTIPLEXER
Communication System – Multiplexer and Demultiplexer both are used in communication systems to carry
out the process of data transmission.A De-multiplexer receives the output signals from the multiplexer; and, at
the receiver end, it converts them back to the original form.
Arithmetic Logic Unit – The output of the arithmetic logic unit is fed as an input to the De-multiplexer, and
the o/p of the demultiplexer is connected to a multiple registers.The output of the ALU can be stored in multiple
registers.
Serial to Parallel Converter – The serial to parallel converter is used to reform parallel data. In this method,
serial data are given as an input to the De-multiplexer at a regular interval, and a counter is attached to the
demultiplexer at the control i/p to sense the data signal at the demultiplexer’s o/p.When all data signals are
stored, the output of the demultiplexer can be read out in parallel.
17. COMBINATIONAL LOGIC CIRCUIT: ENCODER
An Encoder is a combinational circuit that performs the
reverse operation of Decoder.
It has maximum of 2^n input lines and ‘n’ output lines,
hence it encodes the information from 2^n inputs into an n-bit
code.
It will produce a binary code equivalent to the input,which is
active High.Therefore, the encoder encodes 2^n input lines
with ‘n’ bits.
Uses of Encoders –
Encoders are very common electronic circuits used in all
digital systems.
Encoders are used to translate the decimal values to the
binary in order to perform the binary functions such as
addition, subtraction,multiplication,etc.
Other applications especially for Priority Encoders may
include detecting interrupts in microprocessor applications.
18. COMBINATIONAL LOGIC CIRCUIT: ENCODER: 4 : 2 ENCODER
The 4 to 2 Encoder consists of four inputsY3,Y2,Y1 &Y0 and two outputs A1 & A0.At any time, only one
of these 4 inputs can be ‘1’ in order to get the respective binary code at the output.The figure below shows the
logic symbol of 4 to 2 encoder.
Block diagram TruthTableCircuit diagram
Logical expression for A1 and A0 :
A1 =Y3 +Y2
A0 =Y3 +Y1
19. COMBINATIONAL LOGIC CIRCUIT: ENCODER: 4 : 2 ENCODER
The 8 to 3 Encoder or octal to Binary encoder consists of 8 inputs :Y7 toY0 and 3 outputs :A2,A1 & A0. Each
input line corresponds to each octal digit and three outputs generate corresponding binary code.
Block diagram TruthTableCircuit diagram
Logical expression for A1 and A0 :
A2 =Y7 +Y6 +Y5 +Y4
A1 =Y7 +Y6 +Y3 +Y2
A0 =Y7 +Y5 +Y3 +Y1
20. DECIMALTO BCD ENCODER
The decimal to binary encoder usually consists of 10 input lines and 4 output lines. Each input line
corresponds to the each decimal digit and 4 outputs correspond to the BCD code.This encoder accepts the
decoded decimal data as an input and encodes it to the BCD output which is available on the output lines.
Logical expression for A3,A2,A1 and A0 :
A3 =Y9 +Y8
A2 =Y7 +Y6 +Y5 +Y4
A1 =Y7 +Y6 +Y3 +Y2
A0 =Y9 +Y7 +Y5 +Y3 +Y1
Block diagram TruthTableCircuit diagram
21. COMBINATIONAL LOGIC CIRCUIT: DECODER
Decoder is a combinational circuit that has ‘n’ input lines and maximum of 2n output lines. One of these outputs will be
active High based on the combination of inputs present, when the decoder is enabled.That means decoder detects a
particular code.The outputs of the decoder are nothing but the min terms of ‘n’ input variables lines, when it is
enabled.
A Decoder with Enable input can function as a demultiplexer.A demultiplexer is a circuit that receives information from
a single line and directs it to one of possible output lines.
TruthTable-Circuit Diagram
22. COMBINATIONAL LOGIC CIRCUIT: DECODER: 2TO 4 DECODER
Let 2 to 4 Decoder has two inputs A1 & A0 and four outputsY3,Y2,Y1 &Y0.
Enable Inputs Outputs
E A1 A0 Y3 Y2 Y1 Y0
0 x x 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0
Boolean functions for each output
Y3=E.A1.A0Y3=E.A1.A0
Y2=E.A1.A0′Y2=E.A1.A0′
Y1=E.A1′.A0Y1=E.A1′.A0
Y0=E.A1′.A0′
Block diagram TruthTableCircuit diagram
23. ARITHMETIC LOGIC UNIT (ALU)
Inside a computer, there is an Arithmetic Logic Unit (ALU), which is
capable of performing logical operations (e.g.AND, OR, Ex-OR, Invert
etc.) in addition to the arithmetic operations (e.g.Addition, Subtraction
etc.).
The control unit supplies the data required by the ALU from memory,
or from input devices, and directs the ALU to perform a specific
operation based on the instruction fetched from the memory.
ALU is the “calculator” portion of the computer.
An arithmetic logic unit(ALU) is a major component of the central
processing unit of the a computer system.
It does all processes related to arithmetic and logic operations that
need to be done on instruction words.
In some microprocessor architectures, the ALU is divided into the
arithmetic unit (AU) and the logic unit (LU).
24. ARITHMETIC LOGIC UNIT (ALU)
Different operation as carried out by ALU can be categorized as
follows –
logical operations −These include operations like AND, OR,
NOT, XOR, NOR, NAND, etc.
Bit-Shifting Operations −This pertains to shifting the
positions of the bits by a certain number of places either
towards the right or left, which is considered a multiplication or
division operations.
Arithmetic operations −This refers to bit addition and
subtraction.Although multiplication and division are sometimes
used, these operations are more expensive to make.
Multiplication and subtraction can also be done by repetitive
additions and subtractions respectively.
25. ALU CIRCUIT
An ALU can be designed by
engineers to calculate many
different operations.
When the operations become
more and more complex,then
the ALU will also become
more and more expensive and
also takes up more space in
the CPU and dissipates more
heat.
That is why engineers make
the ALU powerful enough to
ensure that the CPU is also
powerful and fast, but not so
complex as to become
prohibitive in terms of cost
and other disadvantages.