Combinational circuit design — Unit 3 Notes (Digital Logic Design)

BCS303 · Unit 3

Combinational circuit design notes — Unit 3

Free unit-wise study notes on combinational circuit design for Digital Logic Design, Semester 3 of B.Tech — Computer Science & Engineering — key concepts, examples, important questions and a revision checklist for semester exams.

Design and analysis of Combinational Circuits. Covers Adders, Subtractors, Comparators, Multiplexers (MUX), Demultiplexers, Decoders, and Encoders.

Notebook — 14 pages

Page 1

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

1. Introduction to Combinational Circuits

Digital circuits are divided into two categories: Combinational and Sequential.

1.1 Characteristics of Combinational Circuits

A Combinational Circuit consists of logic gates whose outputs at any instant of time are determined entirely by the current combination of inputs.

  • No Memory: They have no ability to store past data or states.
  • No Feedback: The output is never fed back into the inputs.
  • Functionality is completely defined by a set of Boolean expressions or a Truth Table.

1.2 General Design Procedure

  • 1. State the problem and determine the number of available inputs and required outputs.
  • 2. Assign letter symbols to inputs and outputs.
  • 3. Derive the Truth Table defining the required relationships.
  • 4. Obtain the simplified Boolean expressions using K-Maps for each output.
  • 5. Draw the logic diagram.

Next — Half and Full Adders

1 of 14

Page 2

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

2. Arithmetic Circuits: Adders

2.1 Half Adder

A combinational circuit that performs the addition of two 1-bit numbers (AA and BB). It produces a Sum (SS) and a Carry (CC).

  • Sum (SS): ABA \oplus B (XOR gate)
  • Carry (CC): ABA \cdot B (AND gate)

Limitation: It cannot accept a carry coming from a previous lower significant bit. This makes it useless for adding multi-bit numbers.

2.2 Full Adder

A circuit that adds three bits: AA, BB, and a Carry-in (CinC_{in}) from a previous stage.

  • Sum (SS): ABCinA \oplus B \oplus C_{in}
  • Carry-out (CoutC_{out}): AB+Cin(AB)AB + C_{in}(A \oplus B)

A Full Adder can be constructed using two Half Adders and an OR gate.

Next — Subtractors

2 of 14

Page 3

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

3. Arithmetic Circuits: Subtractors

3.1 Half Subtractor

Subtracts a 1-bit subtrahend (BB) from a 1-bit minuend (AA), producing a Difference (DD) and a Borrow (BoutB_{out}).

  • Difference (DD): ABA \oplus B (Same as Half Adder Sum!)
  • Borrow (BoutB_{out}): ABA' \cdot B (A is inverted before the AND gate)

3.2 Full Subtractor

Subtracts BB and a Borrow-in (BinB_{in}) from AA.

  • Difference (DD): ABBinA \oplus B \oplus B_{in}
  • Borrow-out (BoutB_{out}): AB+Bin(AB)A'B + B_{in}(A \oplus B)' (or AB+ABin+BBinA'B + A'B_{in} + BB_{in})

Next — Parallel Adder and Subtractor

3 of 14

Page 4

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

4. Multi-Bit Arithmetic

4.1 Ripple Carry Adder (Parallel Adder)

To add nn-bit numbers, we cascade nn Full Adders. The Carry-out of the ithi^{th} adder is connected to the Carry-in of the (i+1)th(i+1)^{th} adder.

Propagation Delay: The major flaw of the Ripple Carry Adder. The Most Significant Bit (MSB) adder cannot compute its final sum until the carry ripples through every single previous stage.

4.2 Carry Look-Ahead Adder (CLA)

A fast adder that solves the ripple delay. It uses complex logic to calculate all carries simultaneously based on the inputs, rather than waiting for them to ripple.
Define: Generate
Gi=AiBiG_i = A_i \cdot B_i and Propagate Pi=AiBiP_i = A_i \oplus B_i.
Carry equations are derived independently of previous carry outputs.

4.3 4-Bit Adder/Subtractor Circuit

By using XOR gates at the BB inputs and a control signal MM, a single Ripple Carry Adder can do both.
If
M=0M=0, it adds.
If
M=1M=1, the XOR gates invert BB (1's complement), and MM acts as the initial Carry-in (adding 1). This creates 2's complement subtraction: A+B+1=ABA + B' + 1 = A - B.

Next — Magnitude Comparator

4 of 14

Page 5

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

5. Magnitude Comparator

A combinational circuit that compares two numbers AA and BB, and determines their relative magnitudes.

It produces three outputs:

  • A>BA > B
  • A=BA = B
  • A<BA < B

5.1 1-Bit Comparator Logic

  • A=BA = B: True when inputs are identical. Equation: ABA \odot B (XNOR)
  • A>BA > B: True when A=1A=1 and B=0B=0. Equation: ABA \cdot B'
  • A<BA < B: True when A=0A=0 and B=1B=1. Equation: ABA' \cdot B

5.2 Multi-Bit Comparator

For multi-bit numbers, equality requires all corresponding bits to be equal: xi=AiBix_i = A_i \odot B_i. Total equality is x3x2x1x0x_3 \cdot x_2 \cdot x_1 \cdot x_0.
For
A>BA>B, check from MSB downwards. E.g., A>BA>B if A3>B3A_3>B_3, OR if (A3=B3A_3=B_3 AND A2>B2A_2>B_2), etc.

Next — Multiplexers (MUX)

5 of 14

Page 6

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

6. Multiplexers (MUX)

A Multiplexer (or Data Selector) is a circuit with many data inputs and one single output. It selects one of the inputs and routes it to the output based on a set of Select Lines.

6.1 2n2^n-to-1 MUX

A MUX has 2n2^n data inputs, nn select lines, and 1 output.

Example: 4-to-1 MUX. Inputs I0,I1,I2,I3I_0, I_1, I_2, I_3. Select lines S1,S0S_1, S_0.

  • If S1S0=00S_1S_0 = 00, Output Y=I0Y = I_0
  • If S1S0=01S_1S_0 = 01, Output Y=I1Y = I_1
  • If S1S0=10S_1S_0 = 10, Output Y=I2Y = I_2
  • If S1S0=11S_1S_0 = 11, Output Y=I3Y = I_3

Boolean Equation: Y=S1S0I0+S1S0I1+S1S0I2+S1S0I3Y = S_1'S_0'I_0 + S_1'S_0I_1 + S_1S_0'I_2 + S_1S_0I_3.

Next — Implementing Boolean Functions using MUX

6 of 14

Page 7

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

7. Implementing Functions using MUX

A Multiplexer is highly versatile. Any nn-variable Boolean function can be implemented using a 2n12^{n-1}-to-1 MUX.

7.1 Procedure

Example: Implement F(A,B,C)=Σm(1,3,5,6)F(A,B,C) = \Sigma m(1, 3, 5, 6) using a 4-to-1 MUX. (3 variables means we need a 231=42^{3-1} = 4-to-1 MUX).

  • Connect the two most significant variables (A, B) to the select lines S1,S0S_1, S_0.
  • Create an Implementation Table. Columns represent the 4 data inputs I0,I1,I2,I3I_0, I_1, I_2, I_3. Rows represent CC' and CC.
  • Fill the table with minterm numbers (0 to 7).
  • Circle the minterms given in the function (1,3,5,6)(1, 3, 5, 6).
  • Determine the input for each column:
    - If neither circled: Input is 0
    - If both circled: Input is 1
    - If only
    CC' circled: Input is CC'
    - If only
    CC circled: Input is CC

Result: Connect CC to I0I_0, CC to I1I_1, CC' to I2I_2, and 00 to I3I_3.

Next — Demultiplexers (DEMUX)

7 of 14

Page 8

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

8. Demultiplexers (DEMUX)

A Demultiplexer performs the exact opposite function of a multiplexer. It takes one single input data line and routes it to one of 2n2^n possible output lines based on nn select lines.

8.1 1-to-4 DEMUX

Input DD. Select lines S1,S0S_1, S_0. Outputs Y0,Y1,Y2,Y3Y_0, Y_1, Y_2, Y_3.

  • If S1S0=00S_1S_0 = 00, Y0=DY_0 = D, all other outputs are 0.
  • If S1S0=01S_1S_0 = 01, Y1=DY_1 = D, all other outputs are 0.

Equations:
Y0=S1S0DY_0 = S_1'S_0' \cdot D
Y1=S1S0DY_1 = S_1'S_0 \cdot D
Y2=S1S0DY_2 = S_1S_0' \cdot D
Y3=S1S0DY_3 = S_1S_0 \cdot D

Next — Decoders

8 of 14

Page 9

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

9. Decoders

A Decoder is a combinational circuit that converts binary information from nn input lines to a maximum of 2n2^n unique output lines.

Interestingly, a Decoder is identical in logic to a Demultiplexer where the data input DD is permanently tied to Logic 1 (or treated as an Enable pin).

9.1 3-to-8 Line Decoder

Inputs: x,y,zx, y, z. Outputs: D0D_0 to D7D_7.

Each output represents a unique minterm. For input 011011 (x=0,y=1,z=1x=0, y=1, z=1), only output D3D_3 goes HIGH. All other outputs remain LOW.

9.2 Implementing Boolean Functions

Since a decoder generates all possible minterms of the input variables, any Boolean function can be implemented using an nn-to-2n2^n decoder and a single OR gate. You just connect the decoder outputs corresponding to the function's minterms into the OR gate.

Next — Encoders

9 of 14

Page 10

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

10. Encoders

An Encoder performs the inverse operation of a decoder. It has 2n2^n input lines and nn output lines. It outputs the binary code corresponding to the single input line that is active (HIGH).

10.1 Octal to Binary Encoder (8-to-3)

Inputs D0D_0 to D7D_7. Outputs x,y,zx, y, z.

If D5D_5 is HIGH, output is 101101 (x=1,y=0,z=1x=1, y=0, z=1).

10.2 Flaws of a Basic Encoder

  • What if two inputs are HIGH simultaneously (e.g., D3D_3 and D6D_6)? The basic encoder fails and outputs garbage (an OR mix of 3 and 6).
  • What if NO input is HIGH? The output is 000. But 000 is also the valid output when D0D_0 is HIGH. This causes ambiguity.

To solve these issues, we use a Priority Encoder.

Next — Priority Encoder

10 of 14

Page 11

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

11. Priority Encoder

A Priority Encoder assigns a priority to each input. If multiple inputs are active simultaneously, the output code corresponds to the input with the highest priority.

11.1 4-to-2 Priority Encoder

Inputs D0,D1,D2,D3D_0, D_1, D_2, D_3. Let higher subscript denote higher priority. Outputs x,yx, y, and a valid bit VV.

  • If D3=1D_3=1, output is 11, regardless of D2,D1,D0D_2, D_1, D_0 (Don't Cares).
  • If D3=0D_3=0 and D2=1D_2=1, output is 10, regardless of D1,D0D_1, D_0.
  • Valid bit VV is set to 1 if any input is active. If all inputs are 0, V=0V=0, distinguishing it from D0D_0 being active.

Heavily used in CPU interrupt controllers, where multiple hardware devices might interrupt the CPU at the exact same time.

Next — Code Converters

11 of 14

Page 12

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

12. Code Converters

A standard combinational circuit design application is translating data from one digital code to another.

12.1 Binary to Gray Code Converter

Let Binary inputs be B3,B2,B1,B0B_3, B_2, B_1, B_0 and Gray Code outputs be G3,G2,G1,G0G_3, G_2, G_1, G_0.

  • G3=B3G_3 = B_3 (MSB remains unchanged)
  • G2=B3B2G_2 = B_3 \oplus B_2
  • G1=B2B1G_1 = B_2 \oplus B_1
  • G0=B1B0G_0 = B_1 \oplus B_0

The circuit requires only three XOR gates.

12.2 BCD to 7-Segment Decoder

Takes a 4-bit BCD input and outputs 7 lines (a, b, c, d, e, f, g) to light up the appropriate LEDs on a 7-segment display. Requires drawing a K-Map for each of the 7 output lines (treating inputs 1010 to 1111 as Don't Cares).

Next — Hazards in Combinational Circuits

12 of 14

Page 13

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

13. Hazards in Combinational Circuits

In theory, logic gates act instantly. In reality, physical gates have a propagation delay. Unequal delays along different paths can cause temporary false outputs, known as Hazards or Glitches.

13.1 Static Hazards

  • Static-1 Hazard: The output is supposed to remain steady at 1, but temporarily dips to 0.
  • Static-0 Hazard: The output is supposed to remain steady at 0, but temporarily spikes to 1.

13.2 Detecting and Eliminating Static Hazards

Static-1 hazards occur in SOP implementations when moving between two adjacent groups in a K-Map. During the input transition, one AND gate turns off slightly before the other turns on, causing the OR gate output to glitch.

Solution: Add a redundant prime implicant to the circuit! Group the two adjacent 1s that span the gap between the two groups. This extra AND gate keeps the output high during the transition.

Next — Summary & Review Checklist

13 of 14

Page 14

Wink Notes

B.Tech CSE — 3rd Semester

Digital Logic Design

Unit - 3

14. Summary & Review Checklist

Combinational circuits are the stateless math engines of the CPU.

14.1 University Exam Checklist

  • Design a Full Adder using two Half Adders and an OR gate. Draw the logic diagram.
  • Explain the drawback of a Ripple Carry Adder and how a Carry Look-Ahead Adder solves it.
  • Implement the Boolean function F(A,B,C,D)=Σm(0,1,3,4,8,9,15)F(A,B,C,D) = \Sigma m(0,1,3,4,8,9,15) using an 8-to-1 MUX.
  • Explain the difference between a Decoder and a Demultiplexer.
  • Design a 4-to-2 Priority Encoder. Provide the truth table and K-Map derivations.
  • Explain Static Hazards and how redundant logic can eliminate them.

14.2 Hardware/VLSI Interview Focus

  • Why is the Carry Look-Ahead logic not used for 64-bit adders directly? (Answer: The fan-in requirement for the AND/OR gates grows astronomically. Large adders use hierarchical block look-aheads).
  • How does a multiplexer act as a universal logic module in modern FPGA architectures (Lookup Tables)?

14 of 14

Continue in this subject