Skip to main content

Digital Logic

Combinational Circuits

Know adder equations and mux-select tricks — combinational blocks are short, high-yield GATE items.

~2 hrs ~1–1.5 marks · High 10 samples · 10 practice · 10 cards

GATE CSE combinational logic — half/full adders, ripple-carry delay, mux/demux, decoder/encoder, comparators, with diagrams and exam tricks.

Learning outcomes

  • Write HA/FA sum and carry equations and build an n-bit ripple adder
  • Estimate ripple-carry critical-path delay for GATE numericals
  • Implement any Boolean function with a mux (and shrink mux size with leftover variables)
  • Use decoders as minterm generators; distinguish encoder vs priority encoder

Half adder & full adder

  • Half adder (2 inputs): Sum S = A ⊕ B, Carry C = A · B. Cannot take Cin — use for LSB only.
  • Full adder (3 inputs): S = A ⊕ B ⊕ Cin, Cout = AB + B Cin + A Cin (majority of A,B,Cin).
  • Cout = 1 for exactly the 4 input rows with at least two 1s among {A,B,Cin}.
  • Two half adders + OR make one full adder: HA(A,B) → S1,C1; HA(S1,Cin) → S,C2; Cout = C1 ∨ C2.
  • Parallel subtractor: A + 2’s complement of B (invert B, Cin=1 on LSB FA), or dedicated full-subtractor equations.

Formulas to remember

  • HA: S = A ⊕ B , C = AB
  • FA: S = A ⊕ B ⊕ Cin
  • FA: Cout = AB ∨ BCin ∨ ACin
ABCinSCout
00000
00110
01010
01101
10010
10101
11001
11111
Half adder and full adder block diagrams with sum and carry equations
Memorise both equation sets — GATE loves FA Cout as majority / “≥2 ones”.

Ripple-carry adder & delay

  • n-bit RCA: FA0…FA(n−1) with Cout_i → Cin_{i+1}. LSB Cin often 0 (or 1 for 2’s-complement subtract).
  • Critical path is the carry chain, not the XOR sum path. Delay ≈ t_setup + n · t_carry (+ final sum XOR if asked).
  • GATE numerical: if each FA carry delay = t_c and sum XOR = t_s, worst-case for n bits ≈ (n−1)t_c + max(t_c,t_s) depending on wording — read carefully.
  • Lookahead / carry-select reduce delay; for GATE DL, knowing why ripple is slow is enough unless COA asks CLA.

Formulas to remember

  • Approx T_ripple ≈ n × t_carry
  • 4-bit example: if t_carry = 2 ns → ≈ 8 ns carry lag LSB→MSB

Worked example

Problem. 4-bit RCA, each FA carry gate 2 ns, ignore sum delay. Carry from Cin to Cout?

Solution. 4 stages × 2 ns = 8 ns along the red carry path.

4-bit ripple-carry adder with four full adders and carry chain highlighted
Red arrows = carry ripple — that path sets the adder’s speed limit.

Multiplexers & demultiplexers

  • Mux: 2^n data inputs, n select lines, 1 output. Selects pick exactly one Ii onto Y.
  • 4:1 needs S1,S0 with 00→I0 … 11→I3. 8:1 needs 3 selects; 16:1 needs 4.
  • Demux (1-to-2^n): inverse of mux — one data steered to one of 2^n lines under selects.
  • Enable pin: when inactive, outputs forced to 0 / Hi-Z (device-dependent); GATE usually assumes active enable.
  • Cascading: build 8:1 from two 4:1 + 2:1, or from a tree of 2:1 muxes.

Formulas to remember

  • Y = Σ Ii · m_i(selects) (m_i = minterm of select lines)
  • n selects ↔ 2^n inputs
4-to-1 multiplexer with data inputs I0-I3, selects S1 S0, and output Y
Always fix which lines are selects before tying data pins.

Implementing functions with a mux

  • Method A (full size): use all variables as selects on a 2^n:1 mux; tie Ii=1 for minterms in F, else 0.
  • Method B (smaller mux): put n−1 vars on selects; each data pin gets 0, 1, leftover var, or its complement from the Shannon expansion.
  • Example: 4:1 mux with selects AB implementing F(A,B,C) — each Ii is a function of C only (0,1,C,¬C).
  • GATE trap: wrong select order (ABC vs CBA) rotates which Ii gets which minterm.

Worked example

Problem. 8-to-1 mux, selects ABC, F=Σm(1,2,4,7). How to wire data pins?

Solution. I1=I2=I4=I7=1; I0=I3=I5=I6=0. Output is F.

8-to-1 mux implementing sum of minterms 1,2,4,7 with ones tied on those data inputs
Green dots mark Ii tied to 1 for minterms present in F.

Decoder, encoder & priority encoder

  • Decoder n→2^n: one-hot outputs = minterms. OR selected outputs to build any SOP.
  • Active-low decoders invert outputs — De Morgan when combining (NAND instead of OR).
  • Encoder 2^n→n: assumes exactly one input active; outputs binary index.
  • Priority encoder: if several inputs are 1, highest-priority line wins; often has “valid” output when any input is active.
  • Demux vs decoder: demux routes a data bit; decoder only decodes address (data implicitly 1).

Formulas to remember

  • 2-to-4: Y0=¬A¬B, Y1=¬AB, Y2=A¬B, Y3=AB
  • F = OR of decoder lines whose minterms are 1

Worked example

Problem. Build F=Σm(1,2) with a 2-to-4 decoder.

Solution. OR Y1 and Y2 (or NAND if active-low outputs, carefully).

2-to-4 decoder generating minterms m0 to m3 from inputs A and B
Decoder = minterm factory; OR the lines you need for F.

Comparators & code converters

  • Equality: bit-wise XNOR, then AND all bit-equals. A=B iff every bit matches.
  • Magnitude (A>B): compare MSB first; cascade “equal so far” into lower bits.
  • Bin↔Gray, BCD↔Excess-3, 7-segment drivers are pure combinational truth-table / K-map problems.
  • Parity generator = multi-input XOR; checker compares received parity.

Formulas to remember

  • EQ = ∧_i (Ai ↔ Bi)
  • Gray g_i = b_i ⊕ b_{i+1} (with g_MSB = b_MSB)

GATE exam tricks — combinational

  • FA Cout = majority: count 1s in {A,B,Cin}; ≥2 ⇒ Cout=1. Fastest MCQ check.
  • Ripple delay questions: follow carry hops, not “number of XOR gates for sum”.
  • Mux function: write the truth table row order matching the select bit weight (MSB select = high half of Ii).
  • Shrinking mux: leftover variable on a data pin is often the giveaway option (C vs ¬C vs 0 vs 1).
  • Decoder + OR ≡ SOP; decoder + NAND on active-low ≡ same with De Morgan.
  • Priority encoder ≠ ordinary encoder — multiple 1s are legal only for priority.
  • Half adder vs full: if Cin appears in the stem, you need FA (or HA chain).
  • n-bit adder with Cin for subtract: setting Cin=1 and inverting B implements A−B in 2’s complement.

Formulas to remember

  • Cout ones-count ≥ 2
  • 2^n:1 mux with all vars as selects → Ii ∈ {0,1} only

Worked example

Problem. Quick check: A=1,B=1,Cin=0 → S and Cout?

Solution. Two 1s ⇒ Cout=1; S = 1⊕1⊕0 = 0. Matches FA row.

Exam tips

  • Lock select-variable order before tying any mux data pin.
  • Full-adder Cout is 1 for ≥2 ones among A,B,Cin — 4 of 8 rows.
  • Ripple delay: count carry stages when the stem says carry lag / propagation.
  • For 4:1 implementing 3-var F, each Ii is 0, 1, C, or ¬C — not a random SOP.
  • Decoder outputs are minterms; OR is the default combiner for active-high.
  • Priority encoder questions hinge on which input has highest priority, not binary encode of many 1s.
  • Subtraction via adder: invert subtrahend and set Cin=1.
  • Equality comparator = AND of XNORs — don’t use XOR unless asking “differ”.
Exam pattern · 10 questions

GATE sample questions & answers

10 GATE-style MCQs for Combinational Circuits with full explanations. Attempt each question before revealing the answer.

Q1 Half adder

Half-adder carry is:

  • A) A⊕B
  • B) A∨B
  • C) A∧B
  • D) A↔B
Show answer & explanation

Answer: C

C=AB.

Q2 Full adder

Full-adder Cout is 1 for how many of 8 input rows?

  • A) 2
  • B) 3
  • C) 4
  • D) 5
Show answer & explanation

Answer: C

Majority: four combinations.

Q3 Mux tree

Min 2-to-1 muxes to build 16-to-1:

  • A) 8
  • B) 15
  • C) 16
  • D) 4
Show answer & explanation

Answer: B

n−1 for n inputs power of two: 15.

Q4 Decoder

A 3-to-8 decoder asserts how many outputs at once (normal)?

  • A) 0
  • B) 1
  • C) 3
  • D) 8
Show answer & explanation

Answer: B

One-hot minterm line.

Q5 Ripple delay

8-bit ripple carry, 2 ns per carry stage, Cin→Cout lag ≈

  • A) 2 ns
  • B) 8 ns
  • C) 16 ns
  • D) 256 ns
Show answer & explanation

Answer: C

8×2=16 ns.

Q6 Priority encoder

Priority encoder vs encoder:

  • A) Same always
  • B) Priority resolves multiple active inputs
  • C) Priority is sequential only
  • D) Encoder needs a clock
Show answer & explanation

Answer: B

Priority picks the highest-order active input.

Q7 Comparator

2-bit equality comparator core:

  • A) OR then AND
  • B) XNOR per bit then AND
  • C) Only half adders
  • D) Only NORs
Show answer & explanation

Answer: B

Bits equal via XNOR; all equal via AND.

Q8 Demux

Demultiplexer has typically:

  • A) Many-to-one data
  • B) One-to-many data under selects
  • C) Only OR gates
  • D) A clock
Show answer & explanation

Answer: B

1 data steered to 2^n lines.

Q9 Mux sizing

n select bits address how many mux inputs?

  • A) n
  • B) 2n
  • C) 2^n
  • D) n²
Show answer & explanation

Answer: C

2^n data inputs.

Q10 Subtractor

Full subtractor Bout depends on:

  • A) Only Diff
  • B) X,Y,Bin like borrow logic
  • C) Clock
  • D) Only XOR
Show answer & explanation

Answer: B

Analogous to FA with borrow in/out.

Topic drill · 10 questions

10 practice questions — Combinational Circuits

Extra page-specific practice beyond the GATE samples. Attempt all 10, then reveal answers to check your reasoning.

P1

FA sum for A=B=Cin=1 is:

  • A) 0 carry 1
  • B) 1 carry 1
  • C) 1 carry 0
  • D) 0 carry 0
Show answer & explanation

Answer: B) 1 carry 1

Three 1s → sum 1, cout 1.

P2

4-to-1 mux select lines:

  • A) 1
  • B) 2
  • C) 3
  • D) 4
Show answer & explanation

Answer: B) 2

2^2=4.

P3

2-to-4 decoder inputs:

  • A) 1
  • B) 2
  • C) 4
  • D) 3
Show answer & explanation

Answer: B) 2

n=2 → 4 outputs.

P4

Half subtractor Diff is:

  • A) A∧B
  • B) A⊕B
  • C) A∨B
  • D) A↔B
Show answer & explanation

Answer: B) A⊕B

Diff same as XOR; borrow is ¬AB.

P5

Building 32-to-1 from 2-to-1 needs:

  • A) 16
  • B) 31
  • C) 32
  • D) 5
Show answer & explanation

Answer: B) 31

32−1=31.

P6

Carry look-ahead mainly reduces:

  • A) Code size
  • B) Ripple carry delay
  • C) Clock need
  • D) Fan-in to 1
Show answer & explanation

Answer: B) Ripple carry delay

Parallelize carry computation.

P7

Active-low decoder outputs are usually:

  • A) One cold (0) among 1s
  • B) All zero
  • C) Random
  • D) Clocked
Show answer & explanation

Answer: A) One cold (0) among 1s

One-hot inverted.

P8

Mux can implement any Boolean function because:

  • A) It stores state
  • B) Data inputs can be tied to 0/1/literals
  • C) It is a flip-flop
  • D) It uses DRAM
Show answer & explanation

Answer: B) Data inputs can be tied to 0/1/literals

Shannon expansion / mux mapping.

P9

n-bit adder minimum FA count (ripple) is:

  • A) n−1
  • B) n
  • C) 2n
  • D) 1
Show answer & explanation

Answer: B) n

One FA per bit (LSB may be HA).

P10

Encoder compresses:

  • A) 2^n lines to n bits
  • B) n to 2^n
  • C) Only clocks
  • D) Analog only
Show answer & explanation

Answer: A) 2^n lines to n bits

Inverse of decoder sizing.

Topic FAQs

Is a mux combinational or sequential?

Combinational — outputs depend only on current selects/data (no clocked state).

How do I remember full-adder Cout quickly?

Cout is the majority function of A, B, Cin — true when at least two of the three inputs are 1 (4 rows out of 8).

Why is ripple-carry slow?

Each stage must wait for the previous carry. Delay grows linearly with bit-width along the carry chain.

Can every Boolean function be built with one mux?

Yes. A 2^n:1 mux with all n variables as selects can realise any n-variable function by tying data inputs to 0/1. Smaller muxes work via Shannon expansion.

Decoder vs demultiplexer?

A decoder decodes an address into one-hot lines. A demux steers a data input to one of those lines under the same selects. Internally similar when data=1.

When is a priority encoder needed?

When more than one input may be active and the design must pick the highest-priority line. A simple encoder assumes one-hot inputs.

Quick revision · 10 cards

10 flashcards — Combinational Circuits

Hover a card to reveal the answer with a 3D flip. On touch devices, tap the card or use Show answer.

Q1 Half adder S and C?
Q2 Full adder Cout in one phrase?
Q3 Mux select count for 2^n inputs?
Q4 8:1 mux implementing Σm — how to tie Ii?
Q5 Decoder output style?
Q6 Ripple-carry delay grows with?
Q7 Equality bit test?
Q8 Is mux sequential?
Q9 Priority encoder purpose?
Q10 A−B with an adder?