UNIT 4: Sequential Circuits, Flip-Flops,
Encoders, Decoders, Encoders, Multiplexers,
Demultiplexers, Counters
Sequential Circuits : In our previous sections, we learned about Adders and Subtracters and their working.
These circuits are called as combinational circuits. The combinational circuits have set of outputs, which
depends only on the present combination of inputs.
Consider below the block diagram of the logic circuit.
Block Diagram of Sequential Circuit
The outputs of the sequential circuits depend on both the combination of present inputs and previous outputs.
The previous output is treated as the present state. So, the sequential circuit contains the combinational circuit
and its memory storage elements.
A sequential circuit doesn't need to always contain a combinational circuit. So, the sequential circuit can
contain only the memory element.
Difference between Combinational & Sequential Circuits
Combinational Circuits Sequential Circuits
The outputs of the sequential circuits
The outputs of the combinational circuit
depend on both present inputs and
depend only on the present inputs.
present state(previous output).
The feedback path is not present in the The feedback path is present in the
combinational circuit. sequential circuits.
In the sequential circuit, memory
In combinational circuits, memory
elements play an important role and
elements are not required.
require.
The clock signal is not required for The clock signal is required for
combinational circuits. sequential circuits.
The combinational circuit is simple to It is not simple to design a sequential
design. circuit.
Flip-Flops: The flip-flop is a circuit that maintains a state until directed by input to change the state.
• A basic flip-flop can be constructed using four-NAND or four-NOR gates.
• Flip-flop is popularly known as the basic digital memory circuit.
• It has its two states as logic 1(High) and logic 0(low) states.
• A flip flop is a sequential circuit which consist of single binary state of information or data.
• The digital circuit is a flip flop which has two outputs and are of opposite states.
There are different types of flip-flops
1. RS Flip-Flops,
2. JK Flip-Flops,
3. Master-Slave JK Flip-Flops
1. RS Flip-Flops:
• The RS flip-flop is used to store binary information (i.e. 0 or 1).
• It consists of two inputs, SET and RESET. In RS flip-flop ‘R’ Stands for RESET and ‘S’ stands for
SET.
• The flip-flop keeps its present state even when one or both inputs are deactivated.
• The flip-flop enters the ‘0’ state when the RESET input is activated, and the ‘1’ state when the SET
input is activated.
RS flip can be constructed using basic logic gates such as NAND gates or NOR gates. Working of RS flip-
flop using NOR gate is explained below.
Note: For a NAND gate, Logic ‘0’ is a dominating input and if any one of its input is Logic ‘0’, then the output
is Logic ‘1’ , irrespective of the other input.
Characteristic or Function Table of SR Flip Flop
Here, S is the Set input, R is the reset input, Qn is the current state input and Qn+1 is the next state outputs.
Simplified Expression from K Map: Qn+1 = S + QnR’
Excitation Table: For a given combination of present state Qn & Qn+1, excitation table tells the inputs
required.
2. JK Flip-Flops: It consists of two inputs and two outputs. Inputs are Set(J) & Reset(K) and their
corresponding outputs are Q and Q’.
• They are the refinement of SR Flipflops in that indeterminate or invalid conditions of SR type are
defined in JK Flip-Flop.
• S is equivalent to J and R is equivalent to K.
• When inputs of both J & K are 1, the output is a complement of previous output (state).
• 2 input NAND gates of SR Flip-Flops are replaced by 3 input NAND gates.
Block diagram of JK Flip-Flop
Intermediate of
invalid states of SR
Flip-Flops are
replaced by
compliment of the
previous output
Qn+1 = Q’nJ + QnK’
Excitation Table:
3. Master Slave JK Flip-Flops: For JK Flip-Flop if J=K=1 for long period of time then Q output will toggle
as long as clock input is 1, which makes the output of Flip-Flop unstable. This process is called as race
around condition. To address this problem J_K Master Slave Flip-Flops are introduced.
• Two JK Flip-Flops are connected together in a series configuration, the first one acts as a master and
the second one acts as slave.
• When Clock is 1, master Flip-Flop gives intermediate output but the slave will not give any output.
When clock is 0, the slave gets activated and copies the previous output.
• Block diagram of JK Master Flip-Flop is shown below.
The characteristic table, KMap and the excitation table remain same as JK Flip-Flops.
Decoders & Encoders
Encoders convert 2N lines of input into a code of N bits and Decoders decode the N bits into 2N lines.
Encoder:
• An encoder is a combinational circuit that converts binary information in the form of a 2N input lines
into N output lines, which represent N bit code for the input.
• For simple encoders, it is assumed that only one input line is active at a time.
• Example of Octal to Binary encoder is shown below.
Boolean Expression:
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.
• An example of 3-to-8 line decoder.
Truth Table of 3-to-8 decoder
Boolean Expression
D0 = X’ Y’ Z’
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
Circuit Diagram
Multiplexers:
• A multiplexer is a combinational circuit that has many data inputs and a single output, depending on
control or select inputs.
• Multiplexers are also known as “N-to-1 selectors,” parallel-to-serial converters, many-to-one
circuits, and universal logic circuits.
• The Mux can be of different types based on input . Ex: 2×1 Mux, 4×1 Mux
2×1 Mux:
The output of the 2×1 Mux will depend on the selection line S0,
• When S0 is 0(low), the I0 is selected
• when S0 is 1(High), I1 is selected
• Logical Expression: Y=S0’.I0+S0.I1
4×1 Mux:
• The 4×1 Multiplexer which is also known as the 4-to-1 multiplexer.
• It is a multiplexer that has 4 inputs and a single output.
• The Output is selected as one of the 4 inputs which is based on the selection inputs.
• In the Given Block Diagram I0, I1, I2, and I3 are the 4 inputs and Y is the Single output which is
based on Select lines S0 and S1.
Using truth table the circuit diagram can be given as below
De-multiplexers:
• DEMUX or De-Multiplexer is a data distributor combinational circuit.
• It works in a reverse way of the Multiplexer.
• The DEMUX has 1 input port and 2^n output lines. Here n signifies the selection line for a DEMUX.
• As per the selection line value, the DEMUX input lines will be connected to receive the output.
• Demultiplexer receives digital information from a single source and converts it into several sources.
• Example: 1x4 DEMUX, 1x8 DEMUX
1x4 DEMUX:
• A 1x4 DEMUX has only one input which is denoted as I. There are two selection lines i.e. S1 and S0.
• The DEMUX has output lines including Y3, Y2, Y1 &Y0.
1x8 DEMUX:
• The 1x8 DEMUX was designed by using two DEMUX.
• They are the two 1x4 DEMUX and one 1x2 DEMUX.
• The 1x8 DEMUX contains two input lines with four outputs.
Introduction to Counters:
• A Counter is a device which stores the number of times a particular event or process has occurred
• Counters are used in digital electronics for counting purpose, they can count specific event happening
in the circuit.
• Counters are used in digital electronics and computing to count the number of ON/OFF signals from
an input device, such as a switch or sensor. They are widely used in computers and other digital
electronic systems.
• Counters are usually made up of several flip-flops connected in a cascade.
• Example: Binary Counter, Ripple Counter
• Applications: Counters are used in many applications, including:
o Microwave ovens: Counters calculate the increase or decrease in temperature and time to
prevent food from overcooking.
o Video games: Counters count fractions.
o Traffic lights: Counters are used in state machines to control transitions.
o Battery-operated mobile devices: Counters are used for counting tasks.
• Block diagram of counter.
• Signal Diagram