BEC302 · DIGITAL SYSTEM DESIGN · Unit 2
Combinational circuits
Unit Scope & Exam Weightage: This unit turns gate-level algebra into MSI building blocks: analysis/design of combinational circuits, half/full adders and subtractors (serial, parallel, BCD), magnitude comparators, multiplexers and demultiplexers, encoders and decoders, circuit realisation with MUX/decoder, and barrel shifter/ALU. The unit consistently contributes 14–21 marks, especially 7-mark design questions on full adders, comparators and MUX-based realisation.
Front Page: Importance-Wise Topic Roadmap (2023–26 PYQs)
| Priority | Topic (Exact Syllabus) | PYQs Asked | Marks Weightage | Tag |
|---|---|---|---|---|
| 1 | half and full adders | 4 (2023-24 ×3, 2025-26) |
7m × 3 + 2m | Survival Mode Design |
| 2 | MSI devices like comparators | 3 (2023-24 ×2, 2024-25) |
7m × 3 | Survival Mode Design |
| 3 | multiplexers (+ circuit realization using Multiplexers and decoders) | 4 (2023-24, 2024-25, 2025-26 ×2) |
7m × 3 + 2m | High-Yield |
| 4 | encoder (+ decoder) | 2 (2024-25 ×2) |
7m + 2m | Design |
| 5 | serial and parallel adders | 1 (2025-26) |
7m | Numerical/Design |
| 6 | subtractors, BCD adder, barrel shifter and ALU | 0 direct | — | Supporting Topic |
2-Hour Last-Night Survival Checklist:
- Adder equations: half adder , ; full adder , ; derive both from the truth table before drawing gates.
- Comparator: ; ; is the complement — memorise this cascade form for any bit width.
- MUX realisation: for an -variable function use an :1 MUX with the remaining variable(s) as data inputs (0, 1, , ); implement 16:1 with five 4:1 MUXes in two levels.
- Encoder/decoder: an decoder gives one-hot minterms; an encoder reverses it; a priority encoder resolves simultaneous inputs by highest index.
- Adder–subtractor: feed into a ripple adder with ; overflow .
1. Analysis and Design of Combinational Circuits
Combinational circuit (2 Marks): a logic network whose outputs at any instant depend only on the present inputs — it contains no memory element and no feedback path. Examples: adders, comparators, multiplexers, decoders, encoders and ALUs.
Design flow: statement → truth table → Boolean expression → minimise (algebra/K-map) → draw logic diagram → verify with the truth table. Analysis flow: logic diagram → equations → truth table → interpretation.
2. Half and Full Adders, Subtractors
2.1 Half Adder
| Sum | Carry | ||
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Limitation: no carry-in, so it cannot be cascaded for multi-bit addition.
2.2 Full Adder
| Sum | ||||
|---|---|---|---|---|
| 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 |
Two half adders plus an OR gate form a full adder: HA1 adds ; HA2 adds ; .
Full adder from NANDs only: generate with four NANDs, with four more, , and — NAND–NAND realisation of .
2.3 Subtractors
- Half subtractor: , .
- Full subtractor: , .
- Practical machines use a adder–subtractor: into the adder; → add, → add 2's complement of .
2.4 Serial and Parallel Adders
| Type | Hardware | Speed | Cost |
|---|---|---|---|
| Serial (bit-serial) | One full adder + shift registers; bits added one at a time | Slow: clock cycles | Very low hardware |
| Ripple-carry parallel | full adders, of stage to of | Moderate: carry ripples through gates | Low, simple |
| Carry-lookahead | Generate , Propagate ; | Fast, logarithmic carry | More hardware |
Overflow in 2's complement: (carry into sign bit XOR carry out). Example 4-bit : carry into MSB =1, carry out=0 → .
2.5 BCD Adder and Barrel Shifter
BCD adder: add two 4-bit BCD digits with a 4-bit binary adder; if the result exceeds 9 ( or ), add (6) via a second adder and take the new carry as the BCD carry.
Barrel shifter: combinational -bit shifter built from log₂ stages of muxes; shift amount selects which input tap reaches the output; used inside ALUs for variable shifts and rotations. ALU = barrel shifter + arithmetic unit + logic unit selected by operation code.
Examiner Tip (adder designs): For the 2023-24 "design a full adder by constructing the truth table and simplify the output equations" question, the marks are in this order: 8-row table (2 marks), via K-map or XOR (2), via K-map (2), gate diagram with two-HA construction (1). Never skip the carry equation — it is the most commonly omitted scoring point.
3. Magnitude Comparators
Comparator (2 Marks): a combinational circuit that compares two binary words and asserts one of , , . It is the decision block in sorting, address decoding and condition-code logic.
3.1 1-Bit Comparison
, , (XNOR).
3.2 2-Bit Comparator Design
Let the numbers be and . Compare the MSB first; if equal, compare the LSB:
| 10 | 01 | 1 | 0 | 0 |
| 01 | 01 | 0 | 1 | 0 |
| 00 | 10 | 0 | 0 | 1 |
| 11 | 11 | 0 | 1 | 0 |
Cascade extension for bits: ; similarly for . This is how a 4-bit comparator IC (74LS85) expands.
4. Multiplexers, Demultiplexers and Function Realisation
Multiplexer (MUX) (2 Marks): a combinational switch that selects one of data inputs and routes it to a single output using select lines. A demultiplexer (DEMUX) performs the reverse: one input is routed to one of outputs.
| Device | Inputs | Outputs | Select lines | Expression for 4:1 |
|---|---|---|---|---|
| 4:1 MUX | 4 data () | 1 | 2 () | |
| 1:4 DEMUX | 1 data | 4 | 2 |
Building a larger MUX: a 16:1 MUX needs four select lines . Use four 4:1 MUXes for groups –, –, –, – driven by ; feed their four outputs into a fifth 4:1 MUX whose select is . Total = five 4:1 MUXes.
Function realisation with an MUX: for an -variable function, use an :1 MUX; apply variables to the select lines and derive each data input as a function (0, 1, variable or complement) of the remaining variable by comparing rows of the truth table.
5. Encoders and Decoders
Decoder (2 Marks): an circuit that activates exactly one output for each input code — its outputs are the minterms, so any Boolean function can be built by OR-ing selected minterms. Encoder: the inverse circuit, converting a one-hot input into an -bit code.
| Feature | Encoder | Decoder |
|---|---|---|
| Direction | inputs → outputs | inputs → outputs |
| Output | Binary code | One-hot minterm |
| Conflict | Multiple inputs ambiguous | Only one output high |
| Priority version | Highest-index active input wins | Enable input for expansion |
4-bit priority encoder (inputs highest priority):
| Reason | |||
|---|---|---|---|
| 0001 | 00 | 1 | only |
| 0010 | 01 | 1 | |
| 0100 | 10 | 1 | |
| 1001 | 11 | 1 | wins over |
Examiner Tip (comparator/MUX): For "Design a two-bit comparator circuit using logic gates", first write the three equations from Section 3.2, then draw two XNOR gates (equality of each bit) and two AND–OR networks; state that needs only one AND of the two XNORs. For MUX questions, always show the truth-table reduction to data inputs — this is where the marks are, not in the MUX symbol.
After-Topic PYQs:
- 2023-24 (7 Marks): "Design a full adder by constructing the truth table and simplify the output equations." / "Implement a full adder using NAND gates."
- 2025-26 (7 Marks): "Describe a circuit of 4-bit binary adder-subtractor with overflow detection."
- 2024-25 (7 Marks): "What is a comparator? Design and implement a 2-bit comparator." / "Design 4 bit priority Encoder."
- 2023-24 / 2025-26 (7 Marks): "What is magnitude comparator? Design a two-bit comparator circuit using logic gates."
- 2024-25 (7 Marks): "What is multiplexer? Design 16:1 multiplexer using 4:1 multiplexer."
- 2025-26 (7 Marks): "Implement the following Boolean function using 4:1 MUX: ."
- 2024-25 (2 Marks): "Differentiate between encoder and decoder."
- 2023-24 (2 Marks): "Explain the operation of a multiplexer." / "How does a full adder differ from a half adder?"
Solved Exam-Ready Questions
Solved Q1 (2023-24 — 7 Marks | Full Adder Design)
Q: Design a full adder by constructing the truth table and simplify the output equations.
Solution:
- Truth table: eight rows with inputs and outputs (given in Section 2.2).
- Sum: at minterms 1,2,4,7; these are exactly the odd-parity combinations, so .
- Carry K-map: group , , .
- Realisation: two half adders and an OR gate, or two XOR gates + three ANDs + one OR.
- Verification row: → , ✓ matches the table.
- Cascade use: tie of the least significant bit to 0 and connect each to the next to form an -bit ripple adder.
Solved Q2 (2023-24 — 7 Marks | Full Adder with NANDs)
Q: Implement a full adder using NAND gates.
Solution:
- Replace every NOT by a NAND with tied inputs: .
- Build XOR using the four-NAND network: , , , .
- Build the second XOR with the same four-NAND structure using and .
- Carry: — use NAND(), NAND() and a final NAND to combine them.
- Total ≈11 NAND gates (4+4+3), all of the same IC type — the practical advantage.
- Check: for : , , ✓.
Solved Q3 (2024-25 — 7 Marks | 2-bit Comparator)
Q: What is a comparator? Design and implement a 2-bit comparator.
Solution:
- Definition: a combinational circuit that compares two binary numbers and generates , , .
- Bitwise equality: , using XNOR gates.
- Equality output: .
- Greater output: — the MSB decides first; only if MSBs are equal does the LSB matter.
- Lesser output: .
- Circuit: two XNOR gates, two inverters per bit pair, three AND gates and two OR gates (or NAND–NAND equivalents).
- Test: , : , → ✓.
Solved Q4 (2024-25 — 7 Marks | 4-bit Priority Encoder)
Q: Design 4 bit priority Encoder.
Solution:
- Inputs: (lowest) … (highest priority). Outputs: and valid bit .
- Truth table: 0001→00, 0010→01, 0100→10, 1000→11; with multiple 1s the highest index wins (e.g. 1001→11).
- whenever or is active: .
- for (provided are 0) or : .
- Valid: ; when no input is asserted.
- Circuit: OR for , NOT–AND–OR for , four-input OR for .
- Check 1101 (): , , → code 11, correct priority.
Solved Q5 (2024-25 — 7 Marks | 16:1 MUX from 4:1 MUXes)
Q: What is multiplexer? Design 16:1 multiplexer using 4:1 multiplexer.
Solution:
- Definition: a MUX selects one of inputs using select lines; output .
- A 16:1 MUX needs four select lines and 16 data inputs.
- First level: four 4:1 MUXes M0–M3 receive –, –, –, – respectively; all use as their select lines.
- Second level: the four outputs feed the data inputs of a fifth 4:1 MUX with select lines .
- Enable handling: if the 4:1 MUX has an active-low enable, drive M0's enable with , M1 with , M2 with , M3 with (a 2:4 decoder); alternatively let the final MUX do all the selection.
- Gate count: five 4:1 MUXes + one 2:4 decoder (if enables are used); selecting routes to ✓.
Solved Q6 (2025-26 — 7 Marks | Function Realisation Using 4:1 MUX)
Q: Implement the following Boolean function using 4:1 MUX: .
Solution:
- Use as the MUX select lines (, ) and express each data input as a function of .
- (minterms 0,1,2,3): values at are → (only gives 0).
- (minterms 4,5,6,7): values → .
- (minterms 8,9,10,11): values → .
- (minterms 12,13,14,15): values → .
- Circuit: one 4:1 MUX, selects ; invert for the first and third data inputs; AND/OR gates for the XNOR; connect directly to .
- Verification: for (m14), and → , matching the minterm list ✓; for () output 0 ✓.
Solved Q7 (2025-26 — 7 Marks | Adder–Subtractor with Overflow)
Q: Describe a circuit of 4-bit binary adder-subtractor with overflow detection.
Solution:
- Block diagram: four full adders in cascade; the input of each passes through a 2-input XOR whose other input is the control line ; the carry-in of the least significant adder is also ; the carry-out of each stage feeds the next carry-in.
- Addition (): , , so .
- Subtraction (): , , so in 2's complement.
- Overflow detector: , where is the carry into the sign bit (bit 3) and is the carry out. Overflow occurs only when adding two numbers of the same sign gives a result of the opposite sign.
- Example: ; , → (true overflow).
- Non-overflow example: ; → .
- Applications: the ALU uses this block with a mode bit and also flags zero, carry and sign from the result.
Practice Questions (Self-Test)
- (2 Marks) How does a full adder differ from a half adder? (Carry-in input; cascadable.)
- (2 Marks) Explain the operation of a multiplexer with the 4:1 output equation.
- (2 Marks) Differentiate between encoder and decoder.
- (7 Marks) Design a BCD adder and explain why 6 (0110) is added when the sum exceeds 9.
- (7 Marks) Implement using an 8:1 MUX and then using a 4:1 MUX.
- (7 Marks) Draw a 4-bit ripple-carry adder and compute the total propagation delay if each full adder takes 20 ns from carry-in to carry-out.