Skip to main content

Design of CMOS Flip-Flops (SR, D, JK)


Design of CMOS Flip-Flops (SR, D, JK)

A flip-flop or latch is a circuit with two stable states, used to store state information. It is the basic storage element in sequential logic and a fundamental building block in digital electronics systems, including computers and communication devices.

Flip-flops and latches act as data storage elements for states, pulse counting, and synchronization of variably-timed input signals to a reference clock. Flip-flops can be transparent/opaque (latches) or clocked (synchronous, edge-triggered). Latches are level-sensitive, while flip-flops are edge-sensitive.

In sequential logic, the output depends on current inputs and previous states. Fig.1 shows a sequential circuit combining a combinational block and a memory element.

Sequential circuit showing combinational logic block connected to memory element
Fig.1: Sequential circuit consisting of a combinational logic block and a memory
Classification of logic circuits based on temporal behavior
Fig.2: Classification of logic circuits based on temporal behaviour

SR Flip-Flop

The SR latch can be implemented using two NAND gates. The circuit changes state when the Set (S) or Reset (R) input is pulled low. A NAND-based SR latch responds to active-low signals. The truth table and gate-level schematic are shown in Fig.3.

SR latch circuit diagram with block diagram and truth table
Fig.3: Circuit, Block Diagram & Truth Table of SR Latch
SR flip-flop circuit implementation
Fig.4: Circuit of SR Flip-Flop
CMOS implementation of SR flip-flop
Fig.5: Circuit of CMOS SR Flip-Flop
Timing diagram waveform of CMOS SR flip-flop
Fig.6: Timing diagram of CMOS SR Flip-Flop

JK Flip-Flop

The JK latch solves the "not allowed" input problem of SR latches by using feedback from outputs to inputs. Fig.7 shows an all-NAND JK latch with active-high inputs. J and K correspond to Set and Reset of an SR latch. If both inputs are 1 during the active clock, the latch toggles its state. Table.1 summarizes the JK flip-flop operation.

JK flip-flop NAND gate implementation
Fig.7: NAND implementation of the JK Flip-Flop
Truth table of JK flip-flop
Table.1: Truth Table of the JK Flip-Flop
CMOS implementation of JK flip-flop circuit
Fig.8: Circuit of CMOS JK Flip-Flop

D Flip-Flop

The D-latch stores a single logic level and acts as a 1-bit register. It has input D and outputs Q and Q’. It is implemented using a NOR-based SR latch: D connects to S and D’ to R through an inverter. When CLK is high, D is transmitted to Q; when CLK is low, the previous state is retained.

NOR gate implementation of D flip-flop
Fig.9: NOR implementation of the D Flip-Flop
CMOS D flip-flop circuit design
Fig.10: Circuit of CMOS D Flip-Flop

Circuits / Block Diagram using S-Edit

CMOS SR flip-flop schematic using S-Edit
Fig.11: CMOS SR Flip-Flop using S-Edit
CMOS JK flip-flop schematic using S-Edit
Fig.12: CMOS JK Flip-Flop using S-Edit
CMOS D flip-flop schematic using S-Edit
Fig.13: CMOS D Flip-Flop using S-Edit

Programming (SPICE Command)

Extract SPICE code using T-Edit.

Graphs (W-Edit)

Simulate schematics and generate waveforms using W-Edit.

Conclusions

The transient response of SR, JK, and D Flip-Flops was studied using CMOS logic. Waveforms were obtained using W-Edit, and SPICE code was extracted using T-Edit. Observed waveforms match theoretical truth tables, validating the designs.

People are good at skipping over material they already know!

View Related Topics to







Contact Us

Name

Email *

Message *

Popular Posts

Simulation of ASK, FSK, and PSK using MATLAB Simulink (with Online Simulator)

📘 Overview 🧮 How to use MATLAB Simulink 🧮 Simulation of ASK using MATLAB Simulink 🧮 Simulation of FSK using MATLAB Simulink 🧮 Simulation of PSK using MATLAB Simulink 🧮 Simulator for ASK, FSK, and PSK 🧮 Digital Signal Processing Simulator 📚 Further Reading ASK, FSK & PSK HomePage MATLAB Simulation Simulation of Amplitude Shift Keying (ASK) using MATLAB Simulink In Simulink, we pick different components/elements from MATLAB Simulink Library. Then we connect the components and perform a particular operation. Result A sine wave source, a pulse generator, a product block, a mux, and a scope are shown in the diagram above. The pulse generator generates the '1' and '0' bit sequences. Sine wave sources produce a specific amplitude and frequency. The scope displays the modulated signal as well as the original bit sequence created by the pulse generator. Mux i...

MATLAB Codes for Various types of beamforming | Beam Steering, Digital...

📘 How Beamforming Improves SNR 🧮 MATLAB Code 📚 Further Reading 📂 Other Topics on Beamforming in MATLAB ... MIMO / Massive MIMO Beamforming Techniques Beamforming Techniques MATLAB Codes for Beamforming... How Beamforming Improves SNR The mathematical [↗] and theoretical aspects of beamforming [↗] have already been covered. We'll talk about coding in MATLAB in this tutorial so that you may generate results for different beamforming approaches. Let's go right to the content of the article. In analog beamforming, certain codebooks are employed on the TX and RX sides to select the best beam pairs. Because of their beamforming gains, communication created through the strongest beams from both the TX and RX side enhances spectrum efficiency. Additionally, beamforming gain directly impacts SNR improvement. Wireless communication system capacity = bandwidth*log2(1+SNR)...

Theoretical BER vs SNR for binary ASK, FSK, and PSK with MATLAB Code + Simulator

📘 Overview & Theory 🧮 MATLAB Codes 📚 Further Reading Theoretical BER vs SNR for Amplitude Shift Keying (ASK) The theoretical Bit Error Rate (BER) for binary ASK depends on how binary bits are mapped to signal amplitudes. For typical cases: If bits are mapped to 1 and -1, the BER is: BER = Q(√(2 × SNR)) If bits are mapped to 0 and 1, the BER becomes: BER = Q(√(SNR / 2)) Where: Q(x) is the Q-function: Q(x) = 0.5 × erfc(x / √2) SNR : Signal-to-Noise Ratio N₀ : Noise Power Spectral Density Understanding the Q-Function and BER for ASK Bit '0' transmits noise only Bit '1' transmits signal (1 + noise) Receiver decision threshold is 0.5 BER is given by: P b = Q(0.5 / σ) , where σ = √(N₀ / 2) Using SNR = (0.5)² / N₀, we get: BER = Q(√(SNR / 2)) Theoretical BER vs ...

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...(MATLAB Code + Simulator)

Bit Error Rate (BER) & SNR Guide Analyze communication system performance with our interactive simulators and MATLAB tools. 📘 Theory 🧮 Simulators 💻 MATLAB Code 📚 Resources BER Definition SNR Formula BER Calculator MATLAB Comparison 📂 Explore M-ary QAM, PSK, and QPSK Topics ▼ 🧮 Constellation Simulator: M-ary QAM 🧮 Constellation Simulator: M-ary PSK 🧮 BER calculation for ASK, FSK, and PSK 🧮 Approaches to BER vs SNR What is Bit Error Rate (BER)? The BER indicates how many corrupted bits are received compared to the total number of bits sent. It is the primary figure of merit for a...

Online Simulator for ASK, FSK, and PSK

Try our new Digital Signal Processing Simulator!   •   Interactive ASK, FSK, and BPSK tools updated for 2025. Start Now Interactive Modulation Simulators Visualize binary modulation techniques (ASK, FSK, BPSK) in real-time with adjustable carrier and sampling parameters. 📡 ASK Simulator 📶 FSK Simulator 🎚️ BPSK Simulator 📚 More Topics ASK Modulator FSK Modulator BPSK Modulator More Topics Simulator for Binary ASK Modulation Digital Message Bits Carrier Freq (Hz) Sampling Rate (...

Constellation Diagrams of ASK, PSK, and FSK (with MATLAB Code + Simulator)

Constellation Diagrams: ASK, FSK, and PSK Comprehensive guide to signal space representation, including interactive simulators and MATLAB implementations. 📘 Overview 🧮 Simulator ⚖️ Theory 📚 Resources Definitions Constellation Tool Key Points MATLAB Code 📂 Other Topics: M-ary PSK & QAM Diagrams ▼ 🧮 Simulator for M-ary PSK Constellation 🧮 Simulator for M-ary QAM Constellation BASK (Binary ASK) Modulation Transmits one of two signals: 0 or -√Eb, where Eb​ is the energy per bit. These signals represent binary 0 and 1. BFSK (Binary FSK) Modulation Transmits one ...

Comparisons among ASK, PSK, and FSK (with MATLAB + Simulator)

📘 Comparisons among ASK, FSK, and PSK 🧮 Online Simulator for calculating Bandwidth of ASK, FSK, and PSK 🧮 MATLAB Code for BER vs. SNR Analysis of ASK, FSK, and PSK 📚 Further Reading 📂 View Other Topics on Comparisons among ASK, PSK, and FSK ... 🧮 Comparisons of Noise Sensitivity, Bandwidth, Complexity, etc. 🧮 MATLAB Code for Constellation Diagrams of ASK, FSK, and PSK 🧮 Online Simulator for ASK, FSK, and PSK Generation 🧮 Online Simulator for ASK, FSK, and PSK Constellation 🧮 Some Questions and Answers Modulation ASK, FSK & PSK Constellation MATLAB Simulink MATLAB Code Comparisons among ASK, PSK, and FSK    Comparisons among ASK, PSK, and FSK Comparison among ASK, FSK, and PSK Parameters ASK FSK PSK Variable Characteristics Amplitude Frequency ...

MATLAB Code for Constellation Diagram of QAM configurations such as 4, 8, 16, 32, 64, 128, and 256-QAM

📘 Overview of QAM 🧮 MATLAB Code for m-ary QAM (4-QAM, 16-QAM, 32-QAM, ...) 🧮 Online Simulator for M-ary QAM Constellations (4-QAM, 16-QAM, 64-QAM, ...) 📚 Further Reading 📂 Other Topics on Constellation Diagrams of QAM configurations ... 🧮 MATLAB Code for 4-QAM 🧮 MATLAB Code for 16-QAM 🧮 MATLAB Code for m-ary QAM (4-QAM, 16-QAM, 32-QAM, ...) 🧮 Simulator for constellation diagrams of m-ary PSK 🧮 Simulator for constellation diagrams of m-ary QAM 🧮 Overview of Energy per Bit (Eb / N0) 🧮 Online Simulator for constellation diagrams of ASK, FSK, and PSK 🧮 Theory behind Constellation Diagrams of ASK, FSK, and PSK 🧮 MATLAB Codes for Constellation Diagrams of ASK, FSK, and PSK   One of the best-performing modulation techniques is QAM [↗] . Here, we modulate the symbols by varying the carrier signal's amplitude and phase in response to the vari...