Unit4 - Subjective Questions
ECE213 • Practice Questions with Detailed Answers
Differentiate between Combinational and Sequential Logic Circuits.
Difference between Combinational and Sequential Circuits:
| Feature | Combinational Logic | Sequential Logic |
|---|---|---|
| Output Dependency | Output depends only on the present input. | Output depends on present input as well as past outputs (history). |
| Memory | No memory element is present. | Contains memory elements (Flip-Flops/Latches) to store state. |
| Feedback | No feedback path exists from output to input. | Feedback path exists from output to input. |
| Clock | Clock signal is not required. | Clock signal is usually required for triggering (in synchronous circuits). |
| Design Complexity | Easier to design. | More complex to design due to timing issues. |
| Speed | Faster (limited only by gate propagation delay). | Slower (limited by clock speed and memory element delays). |
| Examples | Adders, Multiplexers, Encoders. | Flip-Flops, Counters, Registers. |
Explain the operation of an SR Latch using NOR gates with a truth table.
An SR Latch (Set-Reset Latch) is the simplest form of sequential circuit constructed using two cross-coupled NOR gates.
Construction:
- The output of the first NOR gate () is fed back as an input to the second NOR gate.
- The output of the second NOR gate () is fed back as an input to the first NOR gate.
Operation:
- (No Change): The outputs remain in their previous state. If , it forces , which reinforces .
- (Reset): The high input forces the output to $0$. Consequently, becomes $1$. This is the Reset state.
- (Set): The high input forces to $0$, which in turn allows to become $1$. This is the Set state.
- (Invalid): Both outputs try to go to $0$ (due to NOR property), violating the complementary rule (). This state is forbidden.
| Truth Table: | S | R | State | |
|---|---|---|---|---|
| 0 | 0 | Hold | ||
| 0 | 1 | 0 | Reset | |
| 1 | 0 | 1 | Set | |
| 1 | 1 | X | Invalid |
Distinguish between a Latch and a Flip-Flop.
Comparison between Latch and Flip-Flop:
-
Triggering Method:
- Latch: It is Level Triggered. The output changes state as long as the enable input is active (high or low).
- Flip-Flop: It is Edge Triggered. The output changes state only at specific transitions of the clock signal (rising edge or falling edge).
-
Sensitivity:
- Latch: Sensitive to glitches or noise on the control signal because it is transparent during the active level.
- Flip-Flop: Less sensitive to noise on the control signal as it only samples input at the edge.
-
Circuit Complexity:
- Latch: Basic building block, simpler circuit (fewer gates).
- Flip-Flop: Usually constructed using two latches (Master-Slave) or complex gating, consuming more power and area.
-
Use Cases:
- Latch: Used in asynchronous designs, buffer storage.
- Flip-Flop: Used in synchronous systems, registers, counters.
Explain the working of a Clocked SR Flip-Flop using NAND gates.
Clocked SR Flip-Flop:
It consists of a basic NAND latch with two additional NAND gates at the input controlled by a Clock (CLK) signal.
Logic Diagram:
Inputs and are connected to the latch through NAND gates only when .
Working Principle:
- : The gating NAND gates output '1' regardless of and . The basic latch holds the previous state ().
- : The circuit responds to inputs and .
- : Inputs to the latch are $1,1$. No change in state.
- : The Reset path is activated, making .
- : The Set path is activated, making .
- : Inputs to the latch become $0,0$, leading to an invalid state (Race condition/Indeterminate).
Characteristic Equation:
(Valid only when )
Describe the operation of a JK Flip-Flop and explain how it overcomes the limitation of the SR Flip-Flop.
JK Flip-Flop:
The JK Flip-Flop is a modification of the SR Flip-Flop designed to handle the invalid state (). Inputs are labeled (Jump/Set) and (Kill/Reset).
Modification:
Feedback is provided from the outputs back to the inputs:
- Output is ANDed with and .
- Output is ANDed with and .
Operation:
- : No change in state ().
- : Resets the flip-flop ().
- : Sets the flip-flop ().
- (Toggle Mode):
- In an SR FF, this is invalid.
- In a JK FF, due to feedback, if , the input becomes active, resetting the FF. If , the input becomes active, setting the FF.
- The output toggles (complements) its previous state: .
Characteristic Equation:
What is the 'Race Around Condition' in JK Flip-Flops? How can it be avoided?
Race Around Condition:
In a level-triggered JK Flip-Flop, when and :
- The output is supposed to toggle ().
- However, if the propagation delay of the flip-flop () is much less than the pulse width of the clock (), the output will toggle, feed back to the input, and toggle again multiple times within a single clock pulse.
- This causes the output to oscillate between 0 and 1 indeterminately. This is called the Race Around Condition.
Condition for Race Around:
Methods to Avoid:
- Edge Triggering: Using edge-triggered flip-flops that only sample inputs at the transition.
- Master-Slave Configuration: Using two flip-flops (Master and Slave) cascaded, where the Master works on one level (or edge) and the Slave on the other, isolating the output from the input during the active clock.
- Delay: Keeping the clock pulse width very small (), though this is practically difficult.
Explain the working of a Master-Slave JK Flip-Flop with a logic diagram.
Master-Slave JK Flip-Flop:
It consists of two latches connected in series: the first is the 'Master' and the second is the 'Slave'.
Construction:
- Master: Driven by the Clock (). Inputs are and .
- Slave: Driven by the inverted Clock (). Inputs are the outputs of the Master.
Working:
- When (High):
- The Master is active and accepts inputs and .
- The Slave is inactive (disabled) because its clock is 0. Ideally, the Master's output settles, but the Slave output () does not change yet.
- When (Low):
- The Master becomes inactive and holds its data.
- The Slave becomes active (since ). It reads the output of the Master and passes it to the final output .
Significance:
Since the output changes only when goes low, the feedback to the inputs and does not change while the Master is active. This eliminates the Race Around Condition found in standard level-triggered JK flip-flops.
Derive the characteristic equation of a D Flip-Flop and explain its significance.
D Flip-Flop (Data or Delay Flip-Flop):
It has a single data input . It is constructed from an SR or JK flip-flop by ensuring inputs are complementary ( or ).
| Truth Table: | CLK | D | |
|---|---|---|---|
| 0 | 0 | ||
| 1 | 1 |
Derivation of Characteristic Equation:
Using the Excitation table logic or K-Map for :
- When , Next State is 0.
- When , Next State is 1.
- The next state follows the input regardless of the current state .
Equation:
Significance:
- Storage: It stores 1 bit of data. If , it stores 1; if , it stores 0.
- Delay: The output follows the input after a clock cycle delay, making it useful for shift registers and buffers.
- It eliminates the invalid state of the SR flip-flop.
Describe the T Flip-Flop and derive its characteristic equation.
T Flip-Flop (Toggle Flip-Flop):
It is a single-input version of the JK Flip-Flop where inputs and are tied together. The input is denoted by .
Operation:
- (): The flip-flop holds its current state (No Change).
- (): The flip-flop toggles its output ().
| Characteristic Table: | T | ||
|---|---|---|---|
| 0 | 0 | 0 | |
| 0 | 1 | 1 | |
| 1 | 0 | 1 | |
| 1 | 1 | 0 |
Derivation (K-Map):
Looking at the table, is high when inputs are or . This corresponds to the XOR operation.
Characteristic Equation:
What are Excitation Tables? Draw the excitation tables for SR, JK, D, and T flip-flops.
Excitation Table:
An excitation table lists the required inputs to specific flip-flops to achieve a desired transition from a present state () to a next state (). It is essential for synthesis (converting one FF to another).
| 1. SR Flip-Flop: | S | R | ||
|---|---|---|---|---|
| 0 | 0 | 0 | X | |
| 0 | 1 | 1 | 0 | |
| 1 | 0 | 0 | 1 | |
| 1 | 1 | X | 0 |
| 2. JK Flip-Flop: | J | K | ||
|---|---|---|---|---|
| 0 | 0 | 0 | X | |
| 0 | 1 | 1 | X | |
| 1 | 0 | X | 1 | |
| 1 | 1 | X | 0 |
| 3. D Flip-Flop: | D | ||
|---|---|---|---|
| 0 | 0 | 0 | |
| 0 | 1 | 1 | |
| 1 | 0 | 0 | |
| 1 | 1 | 1 |
| 4. T Flip-Flop: | T | ||
|---|---|---|---|
| 0 | 0 | 0 | |
| 0 | 1 | 1 | |
| 1 | 0 | 1 | |
| 1 | 1 | 0 |
Explain the difference between Positive Edge Triggering and Negative Edge Triggering with waveforms.
Edge Triggering:
In edge-triggered flip-flops, the circuit only responds to the control inputs when the clock signal transitions from one level to another. It ignores inputs while the clock is stable (high or low).
1. Positive Edge Triggering:
- Definition: The flip-flop samples inputs and changes state only on the Rising Edge of the clock (transition from Logic 0 to Logic 1).
- Symbol: A triangle () at the clock input pin.
- Operation: Events occur at . Between rising edges, inputs can change without affecting .
2. Negative Edge Triggering:
- Definition: The flip-flop samples inputs and changes state only on the Falling Edge of the clock (transition from Logic 1 to Logic 0).
- Symbol: A triangle with a bubble (circle) at the clock input pin.
- Operation: Events occur at .
Waveform Interpretation:
For a D Flip-Flop:
- Pos-Edge: takes value of exactly when CLK goes .
- Neg-Edge: takes value of exactly when CLK goes .
Perform the conversion of an SR Flip-Flop to a JK Flip-Flop.
Conversion: SR Flip-Flop to JK Flip-Flop
Goal: Design logic to drive and inputs using external and inputs to mimic JK behavior.
Step 1: Conversion Table
We combine the JK Excitation Table with the SR Excitation requirements.
| J | K | Next State () | Required S | Required R | |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | X |
| 0 | 0 | 1 | 1 | X | 0 |
| 0 | 1 | 0 | 0 | 0 | X |
| 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | X | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 |
Step 2: K-Map Simplification
- For S: Group minterms where output is 1. We find
- For R: Group minterms where output is 1. We find
Step 3: Logic Diagram
- Connect an AND gate with inputs and to the pin.
- Connect an AND gate with inputs and to the pin.
- This converts the SR FF into a JK FF.
Convert a JK Flip-Flop into a D Flip-Flop.
Conversion: JK to D
Objective: Derive values for and in terms of such that the JK FF acts like a D FF ().
| Step 1: Conversion Table | D Input | Current | Target | Required J | Required K |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | X | |
| 0 | 1 | 0 | X | 1 | |
| 1 | 0 | 1 | 1 | X | |
| 1 | 1 | 1 | X | 0 |
Step 2: Simplification
- For J: From the table, when . When . Thus, .
- For K: From the table, when . When . Thus, .
Step 3: Circuit Implementation
- Connect input directly to the input.
- Connect input through a NOT gate (inverter) to the input.
This effectively creates a D Flip-Flop.
Outline the general procedure for converting one type of Flip-Flop into another.
General Procedure for Flip-Flop Conversion:
- Identify Available and Required: Determine which Flip-Flop is available (Target/Actual hardware) and which Flip-Flop behavior is desired (Source).
- Draw Conversion Table: Create a table with the following columns:
- Inputs of the Desired Flip-Flop (e.g., if making a JK, columns J and K).
- Current State ().
- Next State () determined by the logic of the Desired Flip-Flop.
- Excitation Inputs of the Available Flip-Flop (e.g., if using SR, columns S and R) required to transition from to .
- K-Map Minimization: Derivate Boolean expressions for the inputs of the Available Flip-Flop in terms of the Desired inputs and .
- Circuit Realization: Draw the combinational logic circuit based on the expressions derived to drive the inputs of the Available Flip-Flop.
Convert a D Flip-Flop to a T Flip-Flop.
Conversion: D to T
Available: D Flip-Flop ()
Required: T Flip-Flop ()
Step 1: Logic
We need to drive the input such that the output toggles when and holds when .
Since for a D FF, , we simply need to equal the characteristic equation of the T FF.
Step 2: Equation
| Step 3: Verification Table | T | Desired | Required D | |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | |
| 0 | 1 | 1 | 1 | |
| 1 | 0 | 1 | 1 | |
| 1 | 1 | 0 | 0 |
From the table, is high when inputs are or . This confirms .
Implementation:
Connect an XOR gate with inputs and to the input.
Explain the concept of 'Transparency' in a D-Latch.
Transparency in D-Latch:
- Definition: A D-Latch is often called a "Transparent Latch" because of how it handles data when the Enable (Clock) signal is active (High).
- Working:
- When Enable = 1: The output follows the input essentially immediately (after gate propagation delay). If changes multiple times while Enable is high, will change correspondingly. The latch is "transparent"; data passes right through it.
- When Enable = 0: The latch becomes opaque. The output retains the last value present at just before the Enable signal went low. Changes in do not affect .
- Contrast: This is different from an edge-triggered D Flip-Flop, which only samples data at the instant of the clock edge and is opaque at all other times.
Derive the characteristic equation for a JK Flip-Flop using a Karnaugh Map.
Derivation of JK Characteristic Equation:
Step 1: Truth Table / Characteristic Table
We look at the next state based on inputs and current state .
| J | K | ||
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 (Reset) |
| 1 | 0 | 0 | 1 (Set) |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 (Toggle) |
| 1 | 1 | 1 | 0 (Toggle) |
Step 2: K-Map for
Variables: .
- Minterms for 1: .
Step 3: Grouping
- Group 1: Combine and . changes (0 to 1), is 0. is 1. Term:
- Group 2: Combine and . changes, is 1. is 0. Term:
Step 4: Final Equation
Convert a JK Flip-Flop to a T Flip-Flop.
Conversion: JK to T
Available: JK Flip-Flop ()
Required: T Flip-Flop ()
| Step 1: Conversion Table | T | Target | Required J | Required K | |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | X | |
| 0 | 1 | 1 | X | 0 | |
| 1 | 0 | 1 | 1 | X | |
| 1 | 1 | 0 | X | 1 |
Step 2: Logic Derivation
- For J: Compare T and J columns. When T=0, J=0. When T=1, J=1.
- For K: Compare T and K columns. When T=0, K=0. When T=1, K=1.
Conclusion:
Connect both and inputs together and connect them to the input . This converts the JK Flip-Flop into a T Flip-Flop (Toggle Mode).
Write short notes on the preset and clear inputs in Flip-Flops.
Preset (PRE) and Clear (CLR) Inputs:
Most practical flip-flop ICs have direct inputs called Preset and Clear. These are Asynchronous Inputs, meaning they affect the output immediately, independent of the Clock signal.
-
Preset (PRE or ):
- Used to set the Flip-Flop state to Logic 1 () immediately.
- Usually active low. When , becomes 1 regardless of or .
-
Clear (CLR or ):
- Used to reset the Flip-Flop state to Logic 0 () immediately.
- Usually active low. When , becomes 0.
Usage:
These inputs are used for system initialization (Power-on Reset) to ensure the circuit starts from a known state before the clock starts running.
Construct a Master-Slave D Flip-Flop using NAND gates and explain its operation.
Master-Slave D Flip-Flop:
Constructed using two D-Latches in series with inverted enable signals.
Construction:
- Master D-Latch: Input , Enable input connected to .
- Slave D-Latch: Input comes from Master's output (), Enable input connected to (Inverted Clock).
Operation:
- :
- Master is enabled (Transparent). follows .
- Slave is disabled (Opaque). Output holds previous value.
- :
- Master is disabled. holds the value of captured just before the falling edge.
- Slave is enabled. It reads and updates .
Result:
Data is sampled at the falling edge of the clock (effectively edge-triggered behavior), isolating input from output during the clock cycle.