Professional Documents
Culture Documents
COURSEMATERIAL
UNIT 3
COURSE B.TECH
SEMESTER III
PREPAREDBY
Dr. G CHANDRAIAH
(Faculty Name/s) Assoc. Professor
VERSION V5
PREPARED/REVISEDDATE
BTECH_CSE_SEM21
SVCE TIRUPATI
BTECH_CSE_SEM21
SVEC TIRUPATI
1. COURSE OBJECTIVES
The objectives of this course are to
1. Introduce the classification of digital circuits and sequential circuits.
2. Outline knowledge on analysis of sequential circuits and design procedure of
combinational circuits.
3. Apply knowledge of K-maps to attain simplified Boolean function.
4. Acquainting with classical hardware design of combinational circuits.
5. Knowledge and hands-on experience that will enable them to work in a digital
system design.
2. PREREQUISITES
Students should have knowledge on
1. Basic Mathematics
3. SYLLABUS
UNIT III
Synchronous Sequential Circuits: Latches, Flipflops, Analysis of clocked Synchronous
Sequential Circuits,.
Registers and Counters: Registers, shift registers, Ripple counters, Synchronous
counters and other counters.
4. COURSE OUTCOMES
1. Describe behavior of Flip-Flops and Latches. (L2)
2. Design synchronous sequential circuits using flipflops and construct digital systems
using components such as registers and counters(L4)
3. Utilize concepts of state and state transition for analysis and design of sequential
circuits(L3)
4. Design synchronous sequential circuits using flipflops and construct digital systems
5. CO-PO/PSOMapping
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 P10 PO11 PO12 PSO1 PSO2
DLD
CO1 3 2 3
CO2 2 3 2
CO3 2 2 2
CO4 3 2 3
CO5 2 3 3
1|DLD-UNIT-IV
BTECH_CSE_SEM21
SVCE TIRUPATI
6. LESSON PLAN
Block diagram
2|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
Flip Flop
Flip flop is a sequential circuit which generally samples its inputs and changes its outputs
only at particular instants of time and not continuously. Flip flop is said to be edge sensitive
or edge triggered rather than being level triggered like latches.
3.2. SR Latch
The bistable element is able to remember or store one bit of information. However,
because it does not have any inputs, we cannot change the information bit that is stored
in it. In order to change the information bit, we need to add inputs to the circuit. The
simplest way to add inputs is to replace the two inverters with two NAND gates. This circuit
is called a SR latch. In addition to the two outputs Q and Q', there are two inputs S' and R'
for set and reset respectively. Following the convention, the prime in S and R denotes that
these inputs are active low. The SR latch can be in one of two states: a set state when Q =
1, or a reset state when Q = 0.
To make the SR latch go to the set state, we simply assert the S' input by setting it to 0.
Remember that 0 NAND anything gives a 1, hence Q = 1 and the latch is set. If R' is not
asserted (R' = 1), then the output of the bottom NAND gate will give a 0, and so Q' = 0. This
situation is shown in Figure 4 (d) at time t0. If we de-assert S' so that S' = R' = 1, the latch will
remain at the set state because Q', the second input to the top NAND gate, is 0 which will
3|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
keep Q = 1 as shown at time t1. At time t2 we reset the latch by making R' = 0. Now, Q'
goes to 1 and this will force Q to go to a 0. If we de-assert R' so that again we have S' = R'
= 1, this time the latch will remain at the reset state as shown at time t3. Notice the two
times (at t1 and t3) when both S' and R' are de-asserted. At t1, Q is at a 1, whereas, at t3, Q
is at a 0. When both inputs are de-asserted, the SR latch maintains its previous state.
Previous to t1, Q has the value 1, so at t1, Q remains at a 1. Similarly, previous to t3, Q has
the value 0, so at t3, Q remains at a 0.
If both S' and R' are asserted, then both Q and Q' are equal to 1 as shown at time t4. If
one of the input signals is de-asserted earlier than the other, the latch will end up in the
state forced by the signal that was de-asserted later as shown at time t5. At t5, R' is de-
asserted first, so the latch goes into the normal set state with Q = 1 and Q' = 0.
A problem exists if both S' and R' are de-asserted at exactly the same time as shown at
time t6. If both gates have exactly the same delay then they will both output a 0 at
exactly the same time. Feeding the zeros back to the gate input will produce a 1, again
at exactly the same time, which again will produce a 0, and so on and on. This oscillating
behavior, called the critical race, will continue forever. If the two gates do not have
exactly the same delay then the situation is similar to de-asserting one input before the
other, and so the latch will go into one state or the other. However, since we do not know
which is the faster gate, therefore, we do not know which state the latch will go into. Thus,
the latch’s next state is undefined.
It is basically S-R latch using NAND gates with an additional enable input. It is also called
as level triggered SR-FF. For this, circuit in output will take place if and only if the enable
input (E) is made active. In short this circuit will operate as an S-R latch if E = 1 but there is
no change in the output if E = 0.
4|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
Block Diagram
Circuit Diagram
Truth Table
Table.3.1. S R flipflop
Operation
1 S = R = 0 : No change Hence R' and S' both will be equal to 1. Since S'
and R' are the input of the basic S-R latch using
NAND gates, there will be no change in the state
of outputs.
5|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
condition.
Master slave JK FF is a cascade of two S-R FF with feedback from the output of second to
input of first. Master is a positive level triggered. But due to the presence of the inverter in
the clock line, the slave will respond to the negative level. Hence when the clock = 1
(positive level) the master is active and the slave is inactive. Whereas when clock = 0 (low
level) the slave is active and master is inactive.
Circuit Diagram
Fig.3.4.JK Flipflop
Truth Table
Table.3.2.J K flipflop
6|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
Operation
7|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
Clock = 1 − Master active, slave inactive. Outputs
of master will toggle. So S and R also will be
inverted.
Delay Flip Flop or D Flip Flop is the simple gated S-R latch with a NAND inverter connected
between S and R inputs. It has only one input. The input data is appearing at the output
after some time. Due to this data delay between i/p and o/p, it is called delay flip flop. S
and R will be the complements of each other due to NAND inverter. Hence S = R = 0 or S =
R = 1, these input condition will never appear. This problem is avoid by SR = 00 and SR = 1
conditions.
Block Diagram
Circuit Diagram
Fig.3.5.D Flipflop
8|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
Truth Table
Table.3.3. D flipflop
Operation
Toggle flip flop is basically a JK flip flop with J and K terminals permanently connected
together. It has only input denoted by T as shown in the Symbol Diagram. The symbol for
positive edge triggered T flip flop is shown in the Block Diagram.
Symbol Diagram
9|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
Block Diagram
Fig.3.5.D Flipflop
Truth Table
Table.3.4. T flipflop
Operation
3.7SHIFT REGISTERS:
Flip-flop is a 1-bit memory cell which can be used for storing the digital data. To
increase the storage capacity in terms of number of bits, it is required to use a group of
flip-flops. Such a group of flip-flops is known as a Register .Then-bit register will consist of n
number of flip-flop and it is capable of storing an n-bit word. The binary data in a register
can be moved within the register from one flip-flop to another. The registers that allow
such data transfers are called as shift registers. There are four mode of operations of a shift
register.
10|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
● Parallel Input Parallel Output
3.7.1.Serial Input Serial Output
Block Diagram
● Data is loaded bit by bit. The outputs are disabled as long as the data is loading.
● As soon as the data loading gets completed, all the flip-flops contain their required
data; the outputs are enabled so that all t he loaded data is made available over
all the output lines at the same time.
● 4 clock cycles are required to load a four-bit word. Hence the speed of operation
of SIPO mode is same as that of SISO mode.
11|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
3.7.3.Parallel Input Serial Output(PISO)
When the shift/load bar line is low (0), the AND gate 2, 4 and 6 become active they
will pass B1, B2, B3 bits to the corresponding flip-flops. On the low going edge of clock, the
binary input B0, B1, B2, B3 will get loaded into the corresponding flip-flops. Thus, parallel
loading takes place.
Shift mode
When the shift/load bar line is low (1), the AND gate 2, 4 and 6 become in active.
Hence the parallel loading of the data becomes impossible .But the AND gate 1,3 and 5
become active. Therefore, the shifting of data from left to right bit by bit on application of
clock pulses. Thus, the parallel in serial out operation takes place.
13|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
Apply the next bit to be stored i.e.1toDin.Apply the clock pulse.As soon as the third
negative clock edge hits, FF-1 will be set and output will be modifiedtoQ3Q2Q1Q0=1110.
Truth Table
Waveforms:
14|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
The simplest register is a 1-bit register. A 1-bit register is simply a single Dflip-flop.It
holds a logical value of exactly one bit in length.Larger registers can hold longer strings of
bits. For example, an 8-bit register holds an 8-bit logical value(i.e.,10110110),and it is
formed by a collection of eight D flip-flops.In order to form a register,form a collection of
flip-flops, the flip-flops must all run on the same clock signal. In general, there are two
majorty pes of registers:
3.7.6. Parallel-Load Registers Shift Registers.
Parallel load registers are a type of register where the individual bit values are
loaded simultaneously. More specifically, every flip-flop with in the register takes an
external data input, and these inputs are loaded in to the flip-flops on the same edge in a
clock cycle.
15|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
register. The shift register is capable of performing the following operation−
● Parallel loading
● Left Shifting
● Right shifting
The mode control input is connected to logic 1 for parallel loading operation where
as it is connected to 0 for serial shifting. With mode control pin connected to ground, the
universal shift register acts as a bi-directional register. For serial left operation, the input is
applied to the serial input which goes to AND gate-1 shown in figure. Whereas for the shift
right operation ,the serial input is applied to D input.
Block Diagram
● The serial-in parallel-out shift register is used to convert serial data into parallel data
thus they are used in communication lines where demultiplexing of a data line into
several parallel line is required.
● A Parallel in Serial out shift register is used to convert parallel data to serial data.
3.9.COUNTERS
17|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
Count starts with binary 0, initially Since T=1, A0 = 1 (complemented) , the transition
of A0 is 0 to 1, so positive transition, which does not affect the other higher order bits.
In the next clock pulse, since T = 1, A0 = 0, complemented again, the transition of A0 from
1 to 0 is negative transition, so triggers the next flip-flop,whose output A1 is
complemented.
A1‘s transition from 0to1 is not propagated. Like wise,the counter counts upto 15 and
goes back to 0 to repeat the count.
ClockPulse A3 A2 A1 A0
Initially 0 0 0 0
1stClock pulse 0 0 0 1
T1=1,A0 is complements.
A0 from 0 to 1 is +ve transition doesnot affect
other flipflops
2ndClock pulse 0 0 1 0
A0from1to0is–vetransition
,so affectA1from0to1(+ve transition) does not
affect other flipflops
3rdclock pulse 0 0 1 1
A0 from 0 to 1 (+ve transition)does not affect
other flipflops
4thclock pulse 0 1 0 0
A0 from1to0(-ve)A1from1to0(-ve)
A2 from 0 to1(+ve)does not affect A3.
5thclock pulse 0 1 0 1
3.9.2.SYNCHRONOUS COUNTER
18|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVCE TIRUPATI
I) Design a 4 BIT BINARY UP COUNTER
State Table:
PresentState Next State Flip-Flop Inputs
A B C D A B C D JA KA JB KB JC KC JD KD
0 0 0 0 0 0 0 1 0 X 0 X 0 X 1 X
0 0 0 1 0 0 1 0 0 X 0 X 1 X X 1
0 0 1 0 0 0 1 1 0 X 0 X X 0 1 X
0 0 1 1 0 1 0 0 0 X 1 X X 1 X 1
0 1 0 0 0 1 0 1 0 X X 0 0 X 1 X
0 1 0 1 0 1 1 0 0 X X 0 1 X X 1
0 1 1 0 0 1 1 1 0 X X 0 X 0 1 X
0 1 1 1 1 0 0 0 1 X X 1 X 1 X 1
1 0 0 0 1 0 0 1 X 0 0 X 0 X 1 X
1 0 0 1 1 0 1 0 X 0 0 X 1 X X 1
1 0 1 0 1 0 1 1 X 0 0 X X 0 1 X
1 0 1 1 1 1 0 0 X 0 1 X X 1 X 1
1 1 0 0 1 1 0 1 X 0 X 0 0 X 1 X
1 1 0 1 1 1 1 0 X 0 X 0 1 X X 1
1 1 1 0 1 1 1 1 X 0 X 0 X 0 1 X
1 1 1 1 0 0 0 0 X 1 X 1 X 1 X 1
Q(t) Q(t+1) J K
0 0 0 X
0 1 1 X
1 0 X 1
1 1 X 0
19|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVECTIRUPATI
20|DLD-UNIT-IV
BTECH_CSE_SEM21
SVECTIRUPATI
II) DESIGN A BINARY UP-DOWN COUNTER
• The two operation (up & down) can be combined together in one circuit to form a
counter capable of counting whether up or down.
• When the up input is‗1‘,the circuit counts up. When the down inputis‗1‘,the circuit
counts down.
UP DOWN Operation
0 0 No Change
0 1 Counts down
1 0 Counts up
1 1 Counts up
21|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVECTIRUPATI
iv) Design a 3-Bit Asynchronous Binary Counter (or) binary ripple counter
The basic operation is the same as that of the 2-bit counter except that the 3-bit
counter has eight states, due to its three Flip-Flops. A timing diagram is shown below for
eight clock pulses. Notice that the counter progresses through a binary count of zero
through seven and then recycles to the zero state. This counter can be easily expanded
for higher count, by connecting additional toggle Flip-Flops.
22|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVECTIRUPATI
9. PracticeQuiz:
(a) Multiple Choice Questions:
1. In which of the following circuits the output of a flip flop will be applied as a
clock input to next stage flip flop
(a)Binary synchronous counter (b)ripplecounter
(c) Ring counter (d) shiftregister
2. Mod60 binary counter requires flipflops
a)60 (b)4 (c)5 (d) 6
3. A 5 bit Johnson counter can count
(a)5 (b)32 (c) 10 (d)31
4. A universal shift register can perform
(a) Serial right shift (b)serial left shift(c)parallel load(d)all the above
5. Assume that a 4-bit counter starts in 0000 state. What will be the count
after10 clock pulses and then active reset occurs?
(a)1100 (b)1001 (c)0000 (d)1111
6. The shift in which 0 getsappendedatLSBpositionis
(a) Right shift(b)logical left shift(c)parallel load(d)none
7. Amod-12 binary counter will count in the sequence ranging from0000 to----
(a)1111 (b)1011 (c)1101 (d)1100
8. The design of mod 6 counter requiresjk flip
flops(a)2(b)6 (c)12 (d) 3
9. The binary data 1101 is loaded into a 4-bit ring counter, the data on the
register after being shifted twice is
(a)0001 (b)1110 (c)0110 (d)1011
10. In order to implement a state diagram of seven states we need minimum of
(a) 5flipflops(b)4flipflops (c) 2flip flops(d)7flipflops
(b) Fill in the blanks
1. The condition SR=11is known as (Ans: not applicable condition)
2. An SR latch can be implemented using---NOR gates NAND gates(Ans:2,4)
3. A latch responds to ----- where as a flip flop responds to (Ans: level, edge)
23|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVECTIRUPATI
4. A sequential counter counts in ----- while anon-sequential counter counts in a
Fashion (Ans: sequence, random)
5. The maximum clock frequency with the increase the flip flops in an
asynchronous counter (Ans: decreases)
6. The modulus of a10-bit ripple counter is(Ans:1024)
7. T=D xor q converts (Ans:T flipflopto D flipflop)
8. Race problem can be solved by (Ans: using master-slave concept)
9. Asynchronous circuits do not operate with the(Ans:clock)
10. An N bit counter that divides the clock frequency by N called
(Ans:ringcounter)
(c) Trueorfalse
1. An bit ring counter can count n clock pulses(2n) [ F]
2. The purpose of RESET input in a sequential circuit is to clear flip flop input[ F]
(f/foutput)
3. The number of flip flops required to realize mod-16 Johnson counter is 8[T]
4. The type o fflipflop used in a shift register is Dflipflop [ T]
5. The shift register can be used as time delay circuit [ T]
6. A4bitserialadderconsistsof3fulladders,2dflipflops(1,1) [ F]
7. The shift in which ‘0’getsappendedatMSBpositionislogicalrightshift[T]
8. JK flipflop complements its outputs whenJ=K=1 [ T]
9. A ring counter which can count5 clockpulsescontains10 flip flops(10)[F]
10. the counting sequence of a modulo -6 gray code counter is
000,001,011,010,100,101,111,110[ T]
10. Assignments:
1. Design a 4-bit binary ripple down-counter using D-flip flops with relevant
timing diagrams
2. Explain the design procedure for sequential logic circuits and give the
classification of sequential logic.
3. Design, Draw and explain a synchronous mod-12 down counter using J-K
flipflop?
4.Explain the following.
i. Race-around condition in flip-flop
ii. J-K Master Slave flip-flop
24|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVECTIRUPATI
iii. Excitation table for flip-flops
5. Convert SR Flip-Flop into JK-Flip-Flop?
25|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVECTIRUPATI
12. Part-B Questions:
1. Compare synchronous and Asynchronous Sequential circuits with examples.
2. Draw the circuit diagram of 4-bit ring counter D-flipflop and explain its
operation.
3. Draw a mod- 6,counter with the following sequence:5,6,7,8,9,10
4. Design a 4-bit binary ripple down counter using a negative edge trigger D-flip
flop.
5. Discuss about synchronous and ripple counters. Compare their merits
and demerits.
6. What do you mean by universal shift register? Draw and explain its
circuit diagram and operation.
7. With neat diagram, explain in detail the operation of a bidirectional
shift registers and also write applications of shift register.
13. Supportive online Certification Courses
1. Digital Systems Design by Prof.D .Roychoudhury ,conducted by IITKharagpur–12
weeks.
2. Digital Electronics circuit By Prof. Gowtham Saha conducted by IIT Kharagpur-12
weeks.
14. Real-TimeApplications
1. Microcontrollers
2. Frequency Synthesizers
3. Digital Clocks
4. Timing circuits
5. Circuits in Communication systems.
15. Content Beyond Syllabus
1. Twisted Ring counter
2. Universal Shift Register
3. Reduction of state flow tables
4. Race-free state assignment
5. Cascaded Counters
16. Prescribed Text Books & Reference Books
Text Book
1. M.MorrisManoandMichaelD.Ciletti,“DigitalDesign",4thEdition,PearsonEducation,2
013.
2. Z.KohaviandN.K.Jha,“SwitchingandFiniteAutomataTheory”,3rdEdition,TataMcGr
awHill,2010.
26|DE&MP-UNIT-III
BTECH_CSE_SEM21
SVECTIRUPATI
3. R.P.Jain,"ModernDigitalElectronics",4thedition,McGrawHillEducation(IndiaPrivate
Limited),2012.
References:
1. Simon Haykin,“ Communication Systems”,3rdEdition,Wiley,2010.
17. Mini Project suggestion
1. Digital Counter
2. Scoring game circuit
27|DE&MP-UNIT-III
BTECH_CSE_SEM21