Chapter 4

Combinational circuit design

A combinational output depends only on present inputs. Translate the specification into a truth table, minimise each output, and then implement it with the allowed gates or functional blocks. Verify the final circuit on every specified row.

4.1 Design from a specification

Past papers · EE 2020–2026 (7 papers): 1 question, 2 marks

Choose input and output codes, list legal and illegal inputs, and state active-high or active-low conventions. Treat an input as don't-care only when it is guaranteed not to occur or when its output is genuinely unspecified. Minimise outputs independently first, then look for shared terms. Verify each output's polarity and any enable signal.

A three-input majority function is the carry of a full adder. To design “exactly two inputs high”, remove the all-ones row from the majority on-set. Symmetric functions depend only on the number of input ones; parity and threshold functions are useful starting points.

4.2 Adders, subtractors and decimal correction

Past papers · EC 2020–2026 (7 papers): 1 question, 1 mark · EE 2020–2026 (7 papers): 1 question, 2 marks

An nn-bit adder-subtractor uses Bi⊕MB_i\oplus M at each second operand input and C0=MC_0=M: mode M=0M=0 adds and M=1M=1 forms A+Bˉ+1A+\bar B+1. Ripple full adders join each carry output to the next carry input. An unsigned nn-by-mm bit product fits in n+mn+m bits; partial products are AND gates shifted by their bit positions.

4.3 Carry lookahead

Past papers · CS 2014–2026 (23 papers): 1 question, 2 marks

Some carry formulas use Pi=Ai+BiP_i=A_i+B_i instead. That convention still permits Ci+1=Gi+PiCiC_{i+1}=G_i+P_iC_i, but the sum remains Ai⊕Bi⊕CiA_i\oplus B_i\oplus C_i. Unlimited-fan-in two-level carry equations do not imply constant delay for bounded-fan-in gates.

4.4 Magnitude comparators

Compare the highest-order unequal bits first. Equality requires equality at every bit position.

4.5 Multiplexers and Shannon expansion

Past papers · CS 2014–2026 (23 papers): 6 questions, 11 marks · EC 2020–2026 (7 papers): 3 questions, 4 marks · EE 2020–2026 (7 papers): 1 question, 1 mark

A multiplexer selects a data input; select inputs are an address, not data that are ORed into the output. Always determine which select bit is MSB and whether enable or output is inverted.

To realise an nn-variable function, use all variables as selects and wire data pins to truth-table constants. With n−1n-1 selects, each data pin becomes 0, 1, the remaining variable or its complement. For cascaded MUXes, substitute stage outputs without changing select order. A disabled output is determined by the device specification; it need not be 0.

4.6 Decoders and demultiplexers

Past papers · CS 2014–2026 (23 papers): 2 questions, 3 marks · EC 2020–2026 (7 papers): 1 question, 1 mark

OR the required active-high decoder outputs to realise a sum of minterms. With active-low decoder outputs, NAND the selected lines instead. A decoder built from one full-width AND per minterm needs 2k2^k such AND gates, plus shared input inversions; this is not the count for a restricted two-input-gate implementation. Cascade decoders through their enables while retaining their active levels.

ROM, SRAM, DRAM, address mapping, machine instructions, ALU, datapath, control and instruction pipelining: see the Computer Organization and Architecture handbook (GATE EC §5).

4.7 Encoders and priority

Past papers · EC 2020–2026 (7 papers): 1 question, 2 marks

An ordinary encoder assumes exactly one active input. A priority encoder resolves simultaneous active inputs, but its output labels need not be the ordinary binary indices. Start with the priority order and the specified encoding.

If a question assigns code 00 to the highest-priority input, this table cannot be used unchanged. Derive the output bits from the specified code labels, including the no-active-input case.

4.8 Code converters

8421 BCD represents each decimal digit separately. Excess-3 adds 3 to each decimal digit before forming its four-bit code. Gray code is non-weighted: adjacent codewords differ in one bit, reducing ambiguity during adjacent-position transitions. A weighted code assigns a fixed weight to each position and represents a digit by the sum of weights at its 1 bits. Aiken 2421 uses the conventional assignments below; the weights alone do not uniquely choose a codeword.

Decimal digit8421 BCDExcess-3Aiken 2421Reflected Gray of the integer
00000001100000000
10001010000010001
20010010100100011
30011011000110010
40100011101000110
50101100010110111
60110100111000101
70111101011010100
81000101111101100
91001110011111101

Excess-3 and the listed Aiken 2421 code are self-complementing: complementing the code gives the code of the 9's-complement decimal digit. For a weighted decimal code, weights summing to 9 make bitwise complementation produce numerical value 9−d9-d for digit dd, provided the chosen code set includes those complementary words. For any converter, tabulate valid input/output pairs, mark truly unused input codes as don't-cares, and minimise each output bit. Seven-segment decoder design follows this same process after defining segment labels and active levels.

Last-minute recall

  • Define illegal inputs before assigning don't-cares.
  • A full-adder carry is a majority function.
  • BCD correction adds 6 when the raw digit exceeds 9 or carries.
  • Carry-lookahead depth depends on allowed fan-in.
  • A MUX data input can itself be a function.
  • Decoder output polarity controls the combining gate.
  • A priority encoder needs the specified code assignment.
  • Gray conversion runs across adjacent binary bits.

Revise offline: the whole Digital Logic and Electronics handbook as one PDF

49 pages · 2.4 MBFree to read online. Sign in to download the PDF.We save the handbook, version and request time in My downloads. Privacy policy

All chapters · Corrections