Chapter 5: Combinational Circuit Design - Complete Study Notes

NotebookLM Ingestion Compilation

This merged document contains all 6 study notes for Chapter 5: Combinational Circuit Design from ECE 2103 Digital Electronics (Sharif Sir).


Related Concepts: 02 Code Converters & Data Routing Implementations | 03 Tree Networks (Cascading MUX, Decoders & DeMUX) | 04 Programmable Logic Devices (ROM & PLA)

5.01 Arithmetic Circuits, Multipliers & Comparators

Combinational Arithmetic Building Blocks

Combinational Arithmetic Circuits form the core of a CPU’s Arithmetic Logic Unit (ALU). Because combinational circuits have no memory elements, their outputs are functions solely of their present inputs.

graph TD
    subgraph 3 Half-Adder Functional Generator
        InA[Inputs A, B] --> HA1[Half-Adder 1: S1 = A ⊕ B, C1 = AB]
        HA1 & InC[Input C] --> HA2[Half-Adder 2: S2 = A ⊕ B ⊕ C = D, C2 = S1 • C = E]
        HA1 & InC --> HA3[Half-Adder 3: S3 = C1 ⊕ C = F, C3 = C1 • C = G]
    end

1. The 4-Function Half-Adder Cascading Puzzle

Major Exam Problem: Implement 4 Functions using 3 Half-Adders (2015, 2018, 2019 - 12 Marks)

Question: Implement the following four Boolean functions using exactly three Half-Adder circuits:

Solution Step-by-Step:

  1. Half-Adder 1 (HA1): Inputs and .

    • Sum Output:
    • Carry Output:
  2. Half-Adder 2 (HA2): Inputs and .

    • Sum Output:
    • Carry Output:
  3. Half-Adder 3 (HA3): Inputs and .

    • Sum Output:
    • Carry Output:

2. Full-Adder to Full-Subtractor Conversion

The Single Inverter Trick (2020 - 10 Marks)

Question: Show that a Full-Adder can be converted to a Full-Subtractor with the addition of one inverter gate.

  • Standard Full-Adder (FA): ,
  • Standard Full-Subtractor (FS): ,

Solution:

Connect an inverter to the Minuend input () before it enters the Full-Adder.

  1. Input to FA becomes .
  2. Carry Out becomes: (matches Full-Subtractor Borrow Out).
  3. Note: The Sum output becomes (complement of Difference).

3. Carry Look-Ahead Mathematical Proof

Major Exam Proof: (2018 - 10 Marks)

Question: Show that the output carry in a full-adder circuit can be expressed as .

Proof Steps:

  1. Standard Full-Adder Carry Out:
  2. Define Carry Generate ():
  3. Define Carry Propagate ():
  4. Substituting and yields:

4. 2-Bit Binary Multiplier Circuit Design

Major PYQ Problem: (2022 - 10 Marks)

Inputs: and . Outputs: .

graph TD
    subgraph Multiplier Architecture
        P0[P0 = A0 • B0]
        AND1[A1 • B0] & AND2[A0 • B1] --> HA1[Half-Adder 1: Sum = P1, Carry = C1]
        AND3[A1 • B1] & HA1 --> HA2[Half-Adder 2: Sum = P2, Carry = P3]
    end
  • Hardware Required: 4 AND gates and 2 Half-Adders.

5. 4-Bit Magnitude Equality Comparator

Major PYQ Problem (2023, 2024, 2025 - 14 Marks)

Question: Design a circuit that compares two 4-bit numbers () and outputs if , and if .

Solution:

  1. Bitwise Equality via XNOR:
  2. Total Equality ():
  3. Circuit: Four 2-input XNOR gates feeding into one 4-input AND gate.

Past Year Questions (PYQs)

  • [PYQ 2015, 2018, 2019]: Implement 4 functions using 3 Half-Adders. (12 Marks)
  • [PYQ 2018]: Carry Look-Ahead proof . (10 Marks)
  • [PYQ 2020]: FA to FS conversion using 1 inverter. (10 Marks)
  • [PYQ 2022]: 2-bit binary multiplier circuit design. (10 Marks)
  • [PYQ 2023, 2024, 2025]: 4-bit magnitude equality comparator (). (14 Marks)

Related Concepts: 01 Arithmetic Circuits, Multipliers & Comparators | 03 Tree Networks (Cascading MUX, Decoders & DeMUX) | 04 Programmable Logic Devices (ROM & PLA)

5.02 Code Converters & Data Routing Implementations

MSI Component Architecture

Medium Scale Integration (MSI) components—such as Decoders, Multiplexers (MUX), and Demultiplexers (DeMUX)—drastically reduce hardware gate counts and wiring complexity by replacing custom SSI gate networks.


1. Core Data Routing Definitions

  • Decoder: Converts binary information from input lines to a maximum of unique output lines {generates all minterms internally}.
  • Multiplexer (MUX): Selects binary data from one of input lines and routes it to a single output controlled by select lines {Data Selector}.
  • Demultiplexer (DeMUX): Takes data from a single input line and routes it to one of output lines controlled by select lines {Data Distributor}.

2. Master Code Converter: 2,4,2,1 to 8,4,-2,-1

Major PYQ Problem (2017, 2019, 2020, 2023, 2024, 2025 - 14 Marks)

Question: Design a combinational circuit to convert a decimal digit from 2,4,2,1 code to 8,4,-2,-1 code.

Complete Conversion Truth Table:

DecimalInputs (2,4,2,1) Outputs (8,4,-2,-1) Weight Check
00 0 0 00 0 0 0
10 0 0 10 1 1 1
20 0 1 00 1 1 0
30 0 1 10 1 0 1
40 1 0 00 1 0 0
51 0 1 11 0 1 1
61 1 0 01 0 1 0
71 1 0 11 0 0 1
81 1 1 01 0 0 0
91 1 1 11 1 1 1
  • Don’t Care Conditions: Unused 2,4,2,1 binary combinations .

3. Implementing Full-Adder using 4x1 Multiplexers

Major PYQ Problem (2021 - 10 Marks)

Inputs: . Use two 4x1 MUXes (select lines ).

graph TD
    subgraph 4x1 MUX Full-Adder Implementation
        S1[Select S1 = X] & S0[Select S0 = Y] --> MUX_Sum[MUX 1: Sum S]
        S1 & S0 --> MUX_Carry[MUX 2: Carry Out C]
        
        Z[Input Z] -->|I0=Z, I1=Z', I2=Z', I3=Z| MUX_Sum
        Z -->|I0=0, I1=Z, I2=Z, I3=1| MUX_Carry
    end

4. Implementing Full-Adder using 3-to-8 Decoder

Major PYQ Problem (2019 - 7 Marks)

Inputs: connected to 3-to-8 decoder select lines.

  • Sum Output (): Connect decoder output pins 1, 2, 4, 7 to a 4-input OR gate .
  • Carry Output (): Connect decoder output pins 3, 5, 6, 7 to a second 4-input OR gate .

Past Year Questions (PYQs)

  • [PYQ 2018, 2019]: Define Decoder, MUX, DeMUX. (06 Marks)
  • [PYQ 2017, 2019, 2020, 2023, 2024, 2025]: 2,4,2,1 to 8,4,-2,-1 code converter. (14 Marks)
  • [PYQ 2021]: Full-Adder using two 4x1 MUXes. (10 Marks)
  • [PYQ 2019]: Full-Adder using 3-to-8 decoder and two OR gates. (07 Marks)

Related Concepts: 01 Arithmetic Circuits, Multipliers & Comparators | 02 Code Converters & Data Routing Implementations | 04 Programmable Logic Devices (ROM & PLA)

5.03 Tree Networks (Cascading MUX, Decoders & DeMUX)

Concept Overview: MSI Tree Networks

When required system line counts exceed single IC capacity, smaller Medium Scale Integration (MSI) components are cascaded into Tree Networks.

  • Multiplexers: Level-1 outputs feed into Level-2 data inputs.
  • Decoders & Demultiplexers: Master decoder uses MSBs to drive the Enable () pins of Slave decoders sharing LSB select lines.
graph TD
    subgraph 16-to-1 MUX Tree Architecture
        LSB[LSB Selects S1 S0] --> M1[4x1 MUX 1: D0-D3] & M2[4x1 MUX 2: D4-D7] & M3[4x1 MUX 3: D8-D11] & M4[4x1 MUX 4: D12-D15]
        M1 & M2 & M3 & M4 --> OutLevel1[4 Intermediate Outputs]
        OutLevel1 --> MUX_Final[Level 2: 4x1 MUX Driven by MSBs S3 S2]
        MUX_Final --> FinalOut[16-to-1 Output Y]
    end

1. 16-to-1 MUX using 4-to-1 MUXes

Major PYQ Problem (2016, 2017 - 8 Marks)

Question: Design a 16-to-1 Multiplexer using 4-to-1 Multiplexers.

Wiring Architecture:

  • Level 1 (4 MUXes): Receives inputs . LSB select lines are connected in parallel to all four MUXes.
  • Level 2 (1 MUX): Receives the 4 intermediate outputs from Level 1. MSB select lines select which block output reaches final .
  • Total Chips: .

2. Decoder Expansion Tree Networks

graph TD
    subgraph Master-Slave Decoder Expansion
        MSB[MSB Inputs A B] --> Master[Master 2x4 Decoder]
        Master -->|O0| E1[Enable Slave 1: Out 0-7]
        Master -->|O1| E2[Enable Slave 2: Out 8-15]
        Master -->|O2| E3[Enable Slave 3: Out 16-23]
        Master -->|O3| E4[Enable Slave 4: Out 24-31]
        
        LSB[LSB Inputs C D E] -->|Parallel Selects| E1 & E2 & E3 & E4
    end

A. 4-to-16 Decoder using Five 2-to-4 Decoders

  • Master Decoder (1 Chip): Driven by MSBs . Outputs drive Enable pins of Slaves.
  • Slave Decoders (4 Chips): Driven by LSBs in parallel. Generates outputs .

B. 5-to-32 Decoder using Four 3x8 and One 2x4 Decoders

  • Master Decoder (2x4 Decoder): Driven by MSBs . Outputs drive Enable pins of 3x8 Slaves.
  • Slave Decoders (Four 3x8 Decoders): Driven by LSBs in parallel. Generates 32 outputs ().

3. 1x16 Demultiplexer using 2-to-4 Decoders

Major PYQ Problem (2023 - 7 Marks)

Question: Implement a 1x16 Demultiplexer using 2-to-4 decoders.

  • Architecture: Wire five 2-to-4 decoders. Connect global Data Input () to the Enable pin of the Master decoder. MSBs drive Master select pins. LSBs drive Slave select pins in parallel.

Past Year Questions (PYQs)

  • [PYQ 2016, 2017]: 16-to-1 MUX using 4-to-1 MUXes. (08 Marks)
  • [PYQ 2021]: 4-to-16 decoder using five 2-to-4 decoders. (10 Marks)
  • [PYQ 2024, 2025]: 5-to-32 decoder using four 3x8 and one 2x4 decoder. (10 Marks)
  • [PYQ 2023]: 1x16 Demux using 2-to-4 decoders. (07 Marks)

Related Concepts: 01 Arithmetic Circuits, Multipliers & Comparators | 02 Code Converters & Data Routing Implementations | 05 Application-Specific Word Problems

5.04 Programmable Logic Devices (ROM & PLA)

PLD Classifications

Programmable Logic Devices (PLDs) replace custom SSI logic networks with dense arrays of AND and OR gates connected via programmable fuses.

  • ROM: Fixed AND array (decoder) + Programmable OR array.
  • PAL: Programmable AND array + Fixed OR array.
  • PLA: Programmable AND array + Programmable OR array {maximum term-sharing flexibility}.
graph LR
    subgraph PLA Architecture
        Inputs[Inputs A B C] --> Buffers[Input Buffers / Inverters]
        Buffers --> ProgAND[Programmable AND Array: k Product Terms]
        ProgAND --> ProgOR[Programmable OR Array: m Outputs]
        ProgOR --> ProgInv[Programmable Output Inverters XOR/Fuses]
        ProgInv --> FinalOutputs[Outputs F1 F2]
    end

1. ROM Design: 3-Bit Input Square Generator

Major PYQ Problem (2015, 2017, 2020, 2021, 2025 - 8 Marks)

Question: Design a combinational circuit using a ROM that accepts a 3-bit number and generates an output equal to its square.

Solution & Optimization:

  • Inputs: 3 bits (, Max ).
  • Outputs: Max bits ().

Truth Table:

DecimalInputs ()Outputs ()
0 0 00 0 0 0 0 0
0 0 10 0 0 0 0 1
0 1 00 0 0 1 0 0
0 1 10 0 1 0 0 1
1 0 00 1 0 0 0 0
1 0 10 1 1 0 0 1
1 1 01 0 0 1 0 0
1 1 11 1 0 0 0 1

Circuit Hardware Optimization:

  • Notice directly {no ROM needed}.
  • Notice permanently {hardwired to Ground}.
  • ROM Size Required: to generate .

2. PLA Design: Shared Product Terms

Major PYQ Problem (2015, 2023, 2024, 2025 - 11 Marks)

Question: Implement and with a PLA having 3 inputs, 4 product terms, and 2 outputs.

Solution:

Simplify and :

Selecting (Complement form) and (True form) shares product terms and ! The 4 distinct AND terms are: .

PLA Program Table:

Product TermInputs ()Outputs ()
1. - 0 01 1
2. 0 - 01 1
3. 0 0 -1 -
4. 1 1 1- 1
Output Mode:C T

Past Year Questions (PYQs)

  • [PYQ 2017, 2024, 2025]: Distinguish between ROM and PLA. (06 Marks)
  • [PYQ 2017, 2018]: Internal block diagram of PLA. (05 Marks)
  • [PYQ 2015, 2017, 2020, 2021, 2025]: 3-bit square generator ROM design. (08 Marks)
  • [PYQ 2015, 2023, 2024, 2025]: PLA design with shared product terms. (11 Marks)

Related Concepts: 01 Arithmetic Circuits, Multipliers & Comparators | 02 Code Converters & Data Routing Implementations | 04 Programmable Logic Devices (ROM & PLA)

5.05 Application-Specific Word Problems

Real-World Logic Synthesis

Application-specific word problems test your ability to convert a real-world scenario into formal Boolean expressions: defining input/output variables constructing the truth table simplifying via K-map drawing the hardware circuit.


1. The Restaurant Voting Tie-Breaker Logic

Major PYQ Problem (2016 - 11 Marks)

Scenario: Mom (), Dad (), Joe (), Sue () vote: Vegetables () vs. Chicken (). Rules:

  1. Majority vote wins.
  2. If Mom and Dad agree, they win regardless of the kids.
  3. Any other tie votes result in Chicken ().

Solution:

  • Minterms where :
  • K-map simplification:
    • Quad (Mom & Dad agree)
    • Pair
    • Pair

2. The Spaceship Battery Monitor

Major PYQ Problem (2017 - 13 Marks)

Scenario: A 4-bit A/D converter () monitors a 0-15V battery. Generate HIGH output if voltage .

Solution:

  • Minterms for :
  • K-map simplification: Octet , Pair .

3. Gas-Fired Boiler Alarm System

Major PYQ Problem (2021 - 10 Marks)

Scenario: Flame (), Chimney Temp (), Water Temp (), Pressure (). Alarm triggers if flame ignited AND chimney temp OR water temp OR pressure is high.


4. 4-Bit Divisibility Indicator (Divisible by 2 and 3)

Major PYQ Problem (2022 - 8 Marks)

Scenario: 4-bit input (). Output if divisible by 2; if divisible by 3.

Solution:

  • Divisible by 2 (): LSB must be
  • Divisible by 3 (): Numbers

Past Year Questions (PYQs)

  • [PYQ 2016]: Restaurant voting logic. (11 Marks)
  • [PYQ 2017]: Spaceship battery monitor logic. (13 Marks)
  • [PYQ 2021]: Boiler alarm logic. (10 Marks)
  • [PYQ 2022]: Binary divisibility indicator for 2 and 3. (08 Marks)

Related Concepts: 02 Code Converters & Data Routing Implementations | 03 Tree Networks (Cascading MUX, Decoders & DeMUX) | 04 Programmable Logic Devices (ROM & PLA)

5.06 Combinational Hardware Edge Cases & Logic Synthesis

Hardware Restrictions & Synthesis

Advanced exam questions test your ability to synthesize functions into restricted hardware architectures {such as designing a MUX using ONLY NAND gates or expanding unsimplified equations for a Decoder}.


1. Design a 4-to-1 MUX using ONLY NAND Gates

Major PYQ Problem (2018 - 10 Marks)

Question: Design a 4-to-1 line multiplexer using NAND gates.

Solution:

  1. MUX SOP Equation:
  2. NAND-NAND Transformation:
  3. Circuit Construction:
    • Two 2-input NAND gates (inputs tied) to produce and .
    • Four 3-input NAND gates in Level 1.
    • One 4-input NAND gate in Level 2.

2. Multi-Equation Decoder Implementation

Major PYQ Problem (2016, 2017, 2019, 2020 - 12 Marks)

Question: Design a circuit using a 3-to-8 decoder and external OR gates for:

Canonical Minterm Expansion Solution:

  1. Expand :

  2. Expand :

  3. Expand :

Circuit Implementation:

  • Connect inputs to a 3-to-8 decoder.
  • : Wire decoder pins 0, 1, 6 into a 3-input OR gate.
  • : Wire decoder pins 0, 1, 2, 3, 6, 7 into a 6-input OR gate (or pins 4, 5 into a 2-input NOR gate).
  • : Wire decoder pins 0, 1, 6, 7 into a 4-input OR gate.

Past Year Questions (PYQs)

  • [PYQ 2018]: 4-to-1 MUX using ONLY NAND gates. (10 Marks)
  • [PYQ 2016, 2017, 2019, 2020]: Multi-equation decoder implementation with unsimplified expressions. (12 Marks)