Unit4 - Subjective Questions
ECE249 • Practice Questions with Detailed Answers
Differentiate between Combinational Logic Circuits and Sequential Logic Circuits.
Difference between Combinational and Sequential Circuits:
| Feature | Combinational Circuits | Sequential Circuits |
|---|---|---|
| Output Dependency | Output depends only on present inputs. | Output depends on present inputs and past history (state). |
| Memory Element | No memory element is present. | Feedback path and memory elements (Flip-flops) are present. |
| Clock Signal | Not required. | Required (for synchronous sequential circuits). |
| Complexity | Simpler design and faster speed. | More complex design and generally slower due to clock. |
| Examples | Adders, Subtractors, MUX, Decoders. | Flip-flops, Counters, Registers. |
Define a Half Adder. Draw its logic circuit and provide the truth table and Boolean expressions.
Half Adder:
A Half Adder is a combinational circuit that performs the addition of two single bits. It has two inputs () and two outputs: Sum () and Carry ().
Boolean Expressions:
- Sum (S):
- Carry (C):
Truth Table:
| A | B | Sum (S) | Carry (C) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Logic Circuit:
It is implemented using one XOR gate (for Sum) and one AND gate (for Carry).
Explain the working of a Full Adder with the help of a Truth Table and K-Maps. Derive the logic expressions.
Full Adder:
A Full Adder performs the addition of three bits (two significant bits and a previous carry input ). It produces a Sum () and a Carry Out ().
Truth Table:
| A | B | Sum (S) | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
K-Map Simplification:
- For Sum (S): The minterms are 1, 2, 4, 7. This results in the XOR relationship of three variables.
- For Carry (): The minterms are 3, 5, 6, 7.
Grouping these on a K-map yields:
Show how to implement a Full Adder using two Half Adders and an OR gate.
Full Adder using Two Half Adders:
A Full Adder can be constructed by cascading two Half Adders.
Step-by-Step Logic:
- First Half Adder:
- Inputs:
- Outputs: ,
- Second Half Adder:
- Inputs: (from first HA) and
- Outputs: Final Sum
- Internal Carry:
- Final Carry Generation:
- The final carry is the logical OR of the carry outputs from both half adders.
Circuit Structure:
- Two XOR gates, Two AND gates, One OR gate.
Design a Half Subtractor circuit. Provide the truth table and logic expressions for Difference and Borrow.
Half Subtractor:
A Half Subtractor takes two 1-bit inputs (Minuend) and (Subtrahend) and produces Difference () and Borrow ().
Truth Table:
| A | B | Diff (D) | Borrow () |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
Boolean Expressions:
- Difference (D): High when inputs are different.
- Borrow (): High only when and .
Circuit: Comprises 1 XOR gate and 1 AND gate with a NOT gate (inverter) on input A.
Explain the Full Subtractor. Derive the Boolean expressions for Difference and Borrow using K-maps.
Full Subtractor:
A circuit that subtracts two bits () considering a borrow from a lower significant stage ().
Truth Table Summary:
Inputs: A, B, C. Outputs: Diff (), Borrow ().
Example row: If A=0, B=0, C=1 Diff=1, Borrow=1.
K-Map Analysis:
-
Difference (): Minterms are 1, 2, 4, 7.
-
Borrow (): Minterms are 1, 2, 3, 7.
Grouping on K-Map:- Group 1 ():
- Group 2 ( - wrapped or neighbors): Actually mapped as
- Group 3 ():
Expression:
Define Multiplexer. Draw the logic diagram and truth table of a 4:1 Multiplexer.
Multiplexer (MUX):
A combinational circuit that selects one of many input lines and directs it to a single output line based on selection lines. It is also called a Data Selector.
4:1 MUX:
- Inputs: 4 Data inputs ().
- Selection Lines: 2 Select lines ().
- Output: 1 Output ().
Truth Table:
| Output (Y) | ||
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
Boolean Expression:
Logic Diagram: Constructed using four 3-input AND gates, two NOT gates (for select lines), and one 4-input OR gate.
Implement the Boolean function using an 8:1 Multiplexer.
Implementation using 8:1 MUX:
-
Identification:
- Variables act as the select lines .
- The function outputs High (1) for minterms 0, 2, 4, 6.
- The function outputs Low (0) for minterms 1, 3, 5, 7.
-
Connections:
- , , .
- Connect inputs to Logic High (/1).
- Connect inputs to Logic Low (Ground/0).
-
Result:
The MUX will now output the value of F based on the binary combination of A, B, and C.
Implement the function using a 4:1 Multiplexer.
Implementation of 3-variable function using 4:1 MUX:
To use a 4:1 MUX (2 select lines) for 3 variables, we use and as Select lines () and as the data input variable.
Implementation Table:
| Input Line | Minterms (C=0) | Minterms (C=1) | Circle Minterms present in F | Logic for Input |
|---|---|---|---|---|
| 0 | 1 | (1) | ||
| 2 | 3 | (3) | ||
| 4 | 5 | (5) | ||
| 6 | 7 | (6) |
Connections:
- connected to
- connected to
- connected to
- connected to
Define De-multiplexer. Explain the working of a 1:4 De-multiplexer with a logic diagram.
De-multiplexer (DEMUX):
A circuit that performs the reverse operation of a multiplexer. It takes a single input data line and routes it to one of output lines based on selection lines.
1:4 DEMUX:
- Input: 1 Data input ().
- Select: 2 Select lines ().
- Outputs: 4 Outputs ().
Logic Expressions:
Operation:
If , the data appears at , while other outputs remain 0.
What is a Decoder? Design a 3:8 Decoder using logic gates.
Decoder:
A combinational circuit that converts binary information from input lines to a maximum of unique output lines. For a given input combination, only one output line is active (High).
3:8 Decoder Design:
- Inputs: (where A is MSB).
- Outputs: to .
Logic Equations (Minterms):
- ... up to ...
Circuit:
Uses three NOT gates (to generate complements of inputs) and eight 3-input AND gates. Each AND gate corresponds to one minterm of the inputs.
Implement a Full Adder circuit using a 3:8 Decoder and external OR gates.
Full Adder using Decoder:
A Full Adder has inputs and outputs Sum () and Carry ().
-
Decoder Configuration:
- Use a 3:8 Decoder. Connect to the select inputs of the decoder.
- The decoder outputs $0$ to $7$ represent the minterms ( to ).
-
Implementation of Sum:
- Connect decoder outputs 1, 2, 4, and 7 to a 4-input OR gate. The output is Sum.
-
Implementation of Carry:
- Connect decoder outputs 3, 5, 6, and 7 to another 4-input OR gate. The output is Carry.
What is an Encoder? Explain the working of an Octal-to-Binary Encoder.
Encoder:
An encoder performs the inverse operation of a decoder. It has (or fewer) input lines and output lines. It converts an active input signal into a coded binary output.
Octal-to-Binary (8:3) Encoder:
- Inputs: (Octal digits).
- Outputs: (Binary representation).
Assumptions:
Only one input is High at a time.
Logic Equations:
- Z (LSB): High if input is 1, 3, 5, or 7.
- Y: High if input is 2, 3, 6, or 7.
- X (MSB): High if input is 4, 5, 6, or 7.
Circuit: Implemented using three 4-input OR gates.
Distinguish between Multiplexer and De-Multiplexer.
Comparison: MUX vs DEMUX
| Feature | Multiplexer (MUX) | De-Multiplexer (DEMUX) |
|---|---|---|
| Function | Data Selector (Many-to-One). | Data Distributor (One-to-Many). |
| Inputs/Outputs | Inputs, 1 Output. | 1 Input, Outputs. |
| Select Lines | select lines to choose input. | select lines to choose output destination. |
| Logic | Uses AND-OR logic logic (SOP). | Uses Decoding logic. |
| Application | Parallel to Serial converter. | Serial to Parallel converter. |
Distinguish between Decoder and Encoder.
Comparison: Decoder vs Encoder
| Feature | Decoder | Encoder |
|---|---|---|
| Operation | Decodes binary information to non-binary (unique output). | Encodes non-binary information into binary code. |
| Input/Output | inputs, outputs. | inputs, outputs. |
| Active Lines | Only one output line is active for a specific code. | Only one input line is assumed active at a time. |
| Internal Logic | Uses AND gates (minterm generation). | Uses OR gates (summing inputs). |
| Use Case | Memory address decoding. | Keyboard input processing. |
Design a 1-bit Magnitude Comparator using basic logic gates.
1-bit Magnitude Comparator:
Compares two 1-bit numbers and . Outputs: , , .
Truth Table:
| A | B | |||
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 |
Logic Expressions:
- A = B: High when inputs are same. (XNOR)
- A > B: High when A=1, B=0.
- A < B: High when A=0, B=1.
Design a 2-bit Magnitude Comparator and derive the logic equations for A=B, A>B and A<B.
2-bit Magnitude Comparator:
Compares two 2-bit numbers and .
Logic Derivation:
-
Equal ():
Both bit positions must be equal.
Let and .
-
Greater Than ():
is greater if MSB , OR if MSBs are equal () AND LSB .
-
Less Than ():
is less if MSB , OR if MSBs are equal () AND LSB .
What is a Priority Encoder? Explain the truth table of a 4-input Priority Encoder.
Priority Encoder:
A standard encoder produces an error if more than one input is High simultaneously. A Priority Encoder assigns priority to inputs; if multiple inputs are active, the output corresponds to the input with the highest priority.
4-Input Priority Encoder (D0 to D3):
Assuming D3 has highest priority.
Truth Table:
| D3 | D2 | D1 | D0 | Outputs (Y1 Y0) | Valid Bit (V) |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | X X | 0 |
| 0 | 0 | 0 | 1 | 0 0 | 1 |
| 0 | 0 | 1 | X | 0 1 | 1 |
| 0 | 1 | X | X | 1 0 | 1 |
| 1 | X | X | X | 1 1 | 1 |
- X indicates "Don't Care".
- If is 1, output is 11 regardless of other inputs.
Explain the concept of 'Carry Look Ahead Adder' qualitatively. Why is it faster than a Ripple Carry Adder?
Ripple Carry Adder Issue:
In a standard parallel adder (Ripple Carry), the carry out of one stage must propagate to the next. For bits, the delay is . This creates a propagation delay bottleneck.
Carry Look Ahead (CLA) Adder:
- Principle: It calculates the carry for a specific stage based directly on the input signals () and the initial carry (), without waiting for the carry to ripple through previous stages.
- Logic: It uses two functions:
- Generate (): A carry is generated independently.
- Propagate (): An incoming carry is propagated.
- Speed: Since logic gates generate carries simultaneously for all bits, the delay is constant and significantly lower than the ripple carry adder.
Implement the following Boolean function using a 4:1 Multiplexer: .
Implementation:
Variable mapping: to Select Lines . to Data Inputs.
Analysis Table:
- If (Row 0): Minterms 0, 1. Function has 0 and 1. Value is $1$ (High).
- If (Row 1): Minterms 2, 3. Function has 3. Value matches .
- If (Row 2): Minterms 4, 5. Function has neither. Value is $0$ (Low).
- If (Row 3): Minterms 6, 7. Function has 6. Value is High when (minterm 6). Value matches .
Result:
Connect to Vcc, to , to GND, to NOT().