Unit 3 of 4 · BCA Sem 1

Unit 3: Sequential logic circuits

Computer Architecture notes · PTU syllabus (UGCC2502)

3 min read6 topics10 exam questions
On this page
  1. Unit summary
  2. Sequential circuits, latches and flip-flops
  3. R-S flip-flop
  4. J-K flip-flop and the race-around condition
  5. Master-Slave J-K flip-flop
  6. D and T flip-flops
  7. Applications of flip-flops
  8. Key terms
  9. Quick revision
  10. Important questions

Unit summary

Sequential circuits have memory: their output depends on the present inputs and also on what happened before. The basic memory element is the flip-flop, which stores one bit. Registers, counters and computer memory are all built from flip-flops.

This unit covers latches and the R-S, J-K, Master-Slave J-K, D and T flip-flops, the race-around problem and its solution, and the main uses of flip-flops.

After this unit you can

  • Distinguish combinational from sequential circuits and latches from flip-flops
  • Write the truth table and characteristic equation of each flip-flop
  • Explain the race-around condition and how a Master-Slave J-K flip-flop removes it
  • List applications of flip-flops

PTU syllabus topics

  • Latches
  • flip-flops — R-S
  • J-K (including race-around condition and its removal)
  • Master-Slave J-K
  • D flip-flop
  • T flip-flop
  • applications of flip-flops
Key termsFlip-flops in one view
SR flip-flop
Set/reset; S = R = 1 is not allowed
JK flip-flop
Like SR but J = K = 1 toggles the output
Master-slave JK
Two stages that remove the race-around problem
D flip-flop
Output follows the D input on the clock edge
T flip-flop
Toggles when T = 1; used in counters
1

Topic 1

Sequential circuits, latches and flip-flops

ComparisonCombinational vs sequential
Combinational
Sequential

Output depends on

Present inputs only

Present inputs and past state

Memory

None

Yes, flip-flops

Clock

Not needed

Usually needed

Examples

Adder, MUX, decoder

Flip-flop, register, counter

A latch is a 1-bit memory element that responds to its inputs whenever it is enabled (level-triggered). A flip-flop is a clocked latch that changes state only at the clock edge (edge-triggered), which makes timing predictable.

2

Topic 2

R-S flip-flop

The S-R (Set-Reset) flip-flop has inputs S and R and outputs Q and Q'.

SRQ(next)Action
00QNo change
010Reset
101Set
11?Invalid (forbidden)

The S = R = 1 condition is not allowed because both outputs try to become equal, breaking the rule that Q and Q' are complements.

3

Topic 3

J-K flip-flop and the race-around condition

The J-K flip-flop removes the invalid state of S-R: when J = K = 1 the output toggles (Q becomes Q').

JKQ(next)
00Q (no change)
010 (reset)
101 (set)
11Q' (toggle)

Characteristic equation: Q(next) = JQ' + K'Q. Race-around condition: in a level-triggered J-K flip-flop with J = K = 1, if the clock pulse stays high longer than the gate delay, the output keeps toggling many times during one pulse, so the final state is unpredictable. Ways to remove it: keep the clock pulse width shorter than the propagation delay, use edge triggering, or use a Master-Slave J-K flip-flop.

4

Topic 4

Master-Slave J-K flip-flop

It is two J-K flip-flops in series. The master is enabled when the clock is high; the slave is enabled when the clock is low (through an inverted clock).

ProcessMaster-Slave operation
  1. 1Clock goes high

    Master reads J and K; slave is locked

  2. 2Clock goes low

    Master is locked; slave copies the master

  3. 3Output changes once per clock cycle

    Race-around is removed

Because the output can change only once per clock cycle, the race-around problem disappears.

5

Topic 5

D and T flip-flops

  • D (Data/Delay) flip-flop: one input D; the output takes the value of D at the clock edge: Q(next) = D. It is made from an S-R or J-K flip-flop with S = D and R = D'. It removes the invalid state and is used in registers.
  • T (Toggle) flip-flop: one input T; if T = 0 the output stays the same, if T = 1 it toggles: Q(next) = T ⊕ Q. It is made from a J-K flip-flop with J = K = T and is used in counters.
Key termsCharacteristic equations
S-R
Q(next) = S + R'Q, with SR = 0
J-K
Q(next) = JQ' + K'Q
D
Q(next) = D
T
Q(next) = T ⊕ Q
6

Topic 6

Applications of flip-flops

  • Registers: a group of flip-flops stores a binary word (an 8-bit register uses 8 flip-flops).
  • Shift registers: move data left or right for serial-parallel conversion.
  • Counters: count clock pulses (T or J-K flip-flops).
  • Frequency division: a T flip-flop divides the clock frequency by 2.
  • Memory: static RAM cells are flip-flops.
  • Debouncing switches and storing status flags in a CPU.

Key terms

Flip-flop
A clocked 1-bit memory element
Latch
A level-triggered 1-bit memory element
Race-around
Repeated toggling of a J-K flip-flop during one clock pulse
Edge triggering
Changing state only at the rising or falling edge of the clock
Characteristic equation
An expression for the next state of a flip-flop

Quick revision

  • S-R: S = R = 1 is invalid.
  • J-K: J = K = 1 toggles; race-around in level-triggered J-K.
  • Master-Slave J-K removes race-around.
  • D: Q(next) = D. T: Q(next) = T ⊕ Q.
  • Flip-flops make registers, counters and memory.

Important exam questions

Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).

Short-answer questions

  1. Q1.Differentiate between a latch and a flip-flop.
  2. Q2.Why is S = R = 1 not allowed in an S-R flip-flop?
  3. Q3.What is the race-around condition?
  4. Q4.Write the characteristic equation of a J-K flip-flop.
  5. Q5.How is a D flip-flop obtained from a J-K flip-flop?
  6. Q6.Give two applications of flip-flops.

Long-answer questions

  1. Q1.Explain the J-K flip-flop with its logic diagram and truth table. What is the race-around condition and how is it removed?
  2. Q2.Explain the working of a Master-Slave J-K flip-flop with a timing diagram.
  3. Q3.Explain D and T flip-flops and their applications.
  4. Q4.Differentiate between combinational and sequential circuits and explain the S-R flip-flop in detail.

Stuck on this unit?

Message SBS on WhatsApp for help with Computer Architecture, or to ask about studying BCA at Synetic.

WhatsApp us