Digital Logic Systems

Digital Logic Systems Unit 4: Combinational Circuits

Digital Logic Systems Unit 4: Combinational Circuits

High-Yield Revision Hub

Master Digital Logic Systems Unit 4: Combinational Circuits

Explore combinational design flow, half/full adders and subtractors, BCD adders, decoders (and 7-segment drivers), encoders (priority), multiplexers, and demultiplexers.

Concept Breakdown

Detailed technical explanation

Unit 4: Combinational Circuits

Combinational logic circuits are digital blocks whose outputs at any time depend only on the combination of inputs present at that exact moment. They do not possess feedback loops or memory elements.


1. General Design Methodology

To design any combinational circuit:

  1. Specify the Problem: Define the system requirements.
  2. Determine Inputs and Outputs: Assign variables to inputs and outputs.
  3. Formulate the Truth Table: List all possible input combinations and corresponding outputs.
  4. Simplify Expressions: Use K-maps or Boolean theorems to find the minimized logic expressions.
  5. Realize the Circuit: Draw the logic diagram using appropriate gates.

2. Arithmetic Circuits

2.1 Half Adder (HA) & Full Adder (FA)

  • Half Adder: Adds two 1-bit numbers (A,BA, B).
    • Sum (SS): AB=AB+ABA \oplus B = A'B + AB'
    • Carry (CC): ABA \cdot B
  • Full Adder: Adds three 1-bit numbers (A,B,CinA, B, C_{in}).
    • Sum (SS): ABCinA \oplus B \oplus C_{in}
    • Carry-out (CoutC_{out}): AB+BCin+ACin=AB+Cin(AB)AB + BC_{in} + AC_{in} = AB + C_{in}(A \oplus B)
    • Realization using 2 Half Adders:
      • HA1S1=ABHA_1 \rightarrow S_1 = A \oplus B, \ C1=ABC_1 = AB
      • HA2S=S1Cin=ABCinHA_2 \rightarrow S = S_1 \oplus C_{in} = A \oplus B \oplus C_{in}, \ C2=S1CinC_2 = S_1 \cdot C_{in}
      • Combined Carry: Cout=C1+C2=AB+Cin(AB)C_{out} = C_1 + C_2 = AB + C_{in}(A \oplus B)
Full Adder using 2 Half Adders: A ----+---------+ | | [HA 1] B ----+--+------|-----\ (Sum1) | | | XOR )-----+-------\ | | +---|-----/ | | [HA 2] | | | | | +---|-----\ (Sum) | | | | | | | XOR)----------- Sum (S) | | | | [AND] | | +-|-----/ | | | +---( )--+ | | | | | | +-------( ) | | | | | [AND] | | | | +-|-|--( )--+ | +---------------|----+ | | ( ) | | | Cin --+ | | +------------------|------------+ | +---+ | +---|OR |---- Carry (Cout) +------------------------| | +---+

2.2 Half Subtractor (HS) & Full Subtractor (FS)

  • Half Subtractor: Computes ABA - B.
    • Difference (DD): ABA \oplus B
    • Borrow (BoutB_{out}): ABA'B
  • Full Subtractor: Computes ABBinA - B - B_{in}.
    • Difference (DD): ABBinA \oplus B \oplus B_{in}
    • Borrow (BoutB_{out}): AB+Bin(AB)=AB+Bin(AB+AB)=AB+Bin(AB)A'B + B_{in}(A \oplus B)' = A'B + B_{in}(A'B' + AB) = A'B + B_{in}(A \oplus B)'

2.3 BCD Adder

A BCD digit can only range from 00 to 99 (00000000 to 10011001). Adding two BCD digits can yield a sum up to 1919 (9+9+1 carry9+9+1 \text{ carry}).

  • Structure: Uses a standard 4-bit binary adder to compute the raw sum (S3S2S1S0S_3 S_2 S_1 S_0) and carry (KK).
  • Correction Rule: If the raw sum is greater than 99 or if a carry K=1K = 1 is generated, it represents an invalid BCD code.
    • Detection logic: Y=K+S3S2+S3S1Y = K + S_3S_2 + S_3S_1
    • If Y=1Y = 1, the sum is invalid. Add 66 (011020110_2) to the raw sum using a second 4-bit binary adder to bypass the 6 invalid states (1010 to 1515).
    • The final output carry is Cout=YC_{out} = Y.
A [4] B [4] | | +--v----------v--+ | 4-Bit Binary |---- Raw Carry (K) | Adder (Stage 1)| +-------+--------+ | Raw Sum [4] (S3 S2 S1 S0) +--------+-------+ | | | | +---+ | | | Y |<----+ (Y = K + S3•S2 + S3•S1) | +---+ | | Correct? (Y = 1 means add 0110, Y = 0 means add 0000) | v +--v--------v----+ | 4-Bit Binary | | Adder (Stage 2)| +-------+--------+ | v Final BCD Sum [4]

3. Data Routing & Conversion Circuits

3.1 Decoders

A decoder converts binary information from nn inputs to a maximum of 2n2^n unique outputs.

  • 3-to-8 Decoder (Binary-to-Octal): Inputs A,B,CA, B, C. Outputs D0D_0 to D7D_7.
    • Output equation for active-high: Di=miD_i = m_i (minterm).
    • Typically includes an active-low Enable (EE) input. If E=1E=1, all outputs are inactive (High/Low depending on polarity).

3.2 Encoders & Priority Encoders

An encoder performs the inverse operation of a decoder, receiving 2n2^n inputs and producing an nn-bit binary code.

  • Problem: In a basic encoder, if two inputs are active simultaneously, the output is corrupted.
  • Solution (Priority Encoder): If multiple inputs are active, only the input with the highest priority is encoded.
  • 4-to-2 Priority Encoder: Inputs D3D_3 (highest priority), D2,D1,D0D_2, D_1, D_0. Outputs X,YX, Y and Validity VV (indicates if any input is active).
D3D_3D2D_2D1D_1D0D_0XXYYVV
00000000XXXX00
00000011000011
000011XX001111
0011XXXX110011
11XXXXXX111111

Equations:

  • X=D3+D2X = D_3 + D_2
  • Y=D3+D2D1Y = D_3 + D_2'D_1
  • V=D3+D2+D1+D0V = D_3 + D_2 + D_1 + D_0

3.3 BCD to 7-Segment Decoder

Converts a BCD code to drive a 7-segment display (composed of LEDs a,b,c,d,e,f,ga, b, c, d, e, f, g).

  • Configurations:
    • Common Anode: All anodes tied to VCCV_{CC}. Display segments light up on Low (00) signals (e.g., IC 7447).
    • Common Cathode: All cathodes tied to GND. Display segments light up on High (11) signals (e.g., IC 7448).
a +-----+ f | | b +--g--+ e | | c +-----+ . dp d

3.4 Multiplexers (MUX / Data Selectors)

A multiplexer routes data from one of 2n2^n inputs to a single output based on nn select lines.

  • 4-to-1 Multiplexer: Inputs I0,I1,I2,I3I_0, I_1, I_2, I_3, Select lines S1,S0S_1, S_0.
    • Output 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

Realization of Boolean Functions using MUX

An nn-variable Boolean function can be implemented using a 2n12^{n-1}-to-1 MUX (n1n-1 select lines):

  1. Connect n1n-1 variables to the select lines of the MUX.
  2. Express the inputs of the MUX in terms of the remaining single variable (say, ZZ), which can take values: 00, 11, ZZ, or ZZ'.
  3. Example: Implement F(A,B,C)=m(1,2,6,7)F(A,B,C) = \sum m(1, 2, 6, 7) using a 4-to-1 MUX.
    • Let A,BA, B be select inputs S1,S0S_1, S_0.
    • For AB=00AB = 00 (covers m0,m1m_0, m_1): F(0,0,0)=0,F(0,0,1)=1I0=CF(0,0,0)=0, F(0,0,1)=1 \rightarrow I_0 = C.
    • For AB=01AB = 01 (covers m2,m3m_2, m_3): F(0,1,0)=1,F(0,1,1)=0I1=CF(0,1,0)=1, F(0,1,1)=0 \rightarrow I_1 = C'.
    • For AB=10AB = 10 (covers m4,m5m_4, m_5): F(1,0,0)=0,F(1,0,1)=0I2=0F(1,0,0)=0, F(1,0,1)=0 \rightarrow I_2 = 0.
    • For AB=11AB = 11 (covers m6,m7m_6, m_7): F(1,1,0)=1,F(1,1,1)=1I3=1F(1,1,0)=1, F(1,1,1)=1 \rightarrow I_3 = 1.

3.5 Demultiplexers (DEMUX / Data Distributors)

A demultiplexer receives data on a single input line and routes it to one of 2n2^n outputs based on nn select lines.

  • A decoder with an Enable line acts exactly as a demultiplexer (Enable line serves as the single data input).

4. Exam Tips & Common Pitfalls

[!WARNING]

  • BCD Adder Correction Check: Do not forget to apply the +01102+0110_2 correction logic to BCD addition whenever a decimal carry (K=1K=1) is generated, even if the raw sum is less than 9 (e.g., 8+8=16d8 + 8 = 16_d, raw sum is 00000000 with carry 11, correction yields 01100110 with carry 11 which is 1616 in BCD).
  • MUX Implementation Variable Selection: The variable placed on the input lines should ideally be the least significant variable to maintain standard minterm numbering.

Key Revision Rules

Essential formulas and core points to memorize

  • 1Combinational circuits: outputs depend strictly on current inputs; no feedback loops or memory.
  • 2Half Adder (Sum = A ⊕ B, Carry = AB) vs. Full Adder (Sum = A ⊕ B ⊕ Cin, Carry = AB + Cin(A ⊕ B)).
  • 3Full Adder implementation using 2 Half Adders and 1 OR gate.
  • 4BCD Adder: adds two BCD digits, applies +0110 correction if sum > 9 or carry generated (detected via Y = K + S3S2 + S3S1).
  • 5Priority Encoder: resolves multiple active inputs by encoding only the highest priority active index.
  • 6Multiplexer (MUX): selects one of 2^n inputs using n select lines. Can implement any n-variable function using a 2^(n-1)-to-1 MUX.

Common Exam Mistakes

Where students frequently lose marks

BCD Adder carry detection: forgetting that if the raw carry K=1 is generated, $+0110$ must be added even if raw sum < 9.
Common Anode vs. Common Cathode 7-segment pins: Common Anode requires active-low drivers (IC 7447); Common Cathode requires active-high drivers (IC 7448).

Topic Quiz Practice

1 of 10
Question 1

In a combinational circuit, the output at any instant depends:

Digital Logic Systems Unit 4: Combinational Circuits - Revision Notes, Formulas & MCQs | UpScorer | UpScorer