All notes

Design of combinational circuits

GATE CS65 min read

Free preview: 29% of the note

Combinational behavior and specifications

Definition. A combinational circuit produces outputs determined only by the present input values. It has no stored state and no feedback path that preserves information from an earlier input. A complete design starts by naming inputs and outputs, writing a truth table, deriving equations, simplifying them, and selecting gates.

Example. A two-input alarm output that is 1 exactly when both sensors report danger is F=ABF=AB.

Exam point. If an output depends on the previous cycle, the circuit is sequential, even if its gates look combinational.

Truth tables and output equations

Definition. A truth table lists every input combination and the corresponding output. For nn binary inputs it has 2n2^n rows. Each output may be converted independently into SOP from its 1 rows or POS from its 0 rows.

Example. A three-input majority output is 1 when at least two inputs are 1.

Exam point. Confirm that all input rows occur exactly once and that output labels match the stated condition.

Solved design. Design the majority function for A,B,CA,B,C.

  1. Enumerate inputs 000 through 111.
  2. Rows with at least two ones are 011, 101, 110, and 111.
  3. The canonical SOP is A′BC+AB′C+ABC′+ABCA'BC+AB'C+ABC'+ABC.
  4. Grouping or reasoning by pairs gives F=AB+AC+BCF=AB+AC+BC.
AABBCCFF
0000
0010
0100
0111
1000
1011
1101
1111

Answer. F=AB+AC+BCF=AB+AC+BC.

Deriving a circuit from a verbal condition

Definition. Translate each part of a specification into a Boolean condition, then combine conditions using AND, OR, or complement. “Only if” creates a necessary condition; “either” may mean inclusive OR unless exclusivity is stated. The truth table resolves ambiguity before simplification.

Example. A lamp turns on if switch AA is on or both BB and CC are on: F=A+BCF=A+BC.

Exam point. Inclusive OR allows both alternatives to hold at once.

Solved design. A controller asserts output YY when request RR is active and either permission PP is active or override OO is active, but a lock LL must be absent.

  1. The request is required: include factor RR.
  2. Permission OR override is (P+O)(P+O).
  3. “Lock absent” means L′L'.
  4. Combine the requirements: Y=R(P+O)L′Y=R(P+O)L'.
  5. For a check, if R=1,P=0,O=1,L=0R=1,P=0,O=1,L=0, then Y=1Y=1; if L=1L=1, it is 0. Answer. Y=R(P+O)L′Y=R(P+O)L'.

Half adder

Definition. A half adder adds two one-bit operands without a carry input. Its sum is XOR, and its carry is AND. It is a combinational building block; it does not store the carry output for a later operation.

Example. 1+11+1 produces sum 0 and carry 1.

Exam point. Sum and carry are separate outputs; do not confuse the carry bit with the sum bit.

Solved design. Derive the half-adder equations.

  1. Inputs are A,BA,B; the binary sum is 0 for 00 and 11, and 1 for 01 and 10.
  2. Therefore S=A⊕BS=A\oplus B.
  3. Carry is 1 only when both bits are 1, so C=ABC=AB.
  4. Check all four rows.
AABBSSCC
0000
0110
1010
1101

Answer. S=A⊕BS=A\oplus B, C=ABC=AB.

Full adder

Definition. A full adder adds bits A,BA,B and carry-in CinC_{in}. The two outputs are sum SS and carry-out CoutC_{out}. Their equations are S=A⊕B⊕CinS=A\oplus B\oplus C_{in} and Cout=AB+ACin+BCinC_{out}=AB+AC_{in}+BC_{in}.

Example. Inputs 1,1,1 represent decimal 3, so the output pair is 11.

Exam point. Carry-out is the majority function of the three input bits.

Solved design. Construct a full adder from two half adders and one OR gate.

  1. First half adder adds A,BA,B: S1=A⊕BS_1=A\oplus B, C1=ABC_1=AB.
  2. Second half adder adds S1,CinS_1,C_{in}: S=S1⊕CinS=S_1\oplus C_{in} and C2=S1CinC_2=S_1C_{in}.
  3. Combine carry outputs: Cout=C1+C2C_{out}=C_1+C_2.
  4. Substitute: Cout=AB+(A⊕B)CinC_{out}=AB+(A\oplus B)C_{in}.
  5. Expanding XOR gives AB+A′BCin+AB′CinAB+A'BC_{in}+AB'C_{in}, which simplifies to AB+ACin+BCinAB+AC_{in}+BC_{in}. Answer. Two half adders and one OR gate implement a full adder.

Ripple-carry addition

Definition. A ripple-carry adder connects the carry output of bit position ii to the carry input of position i+1i+1. It computes multi-bit binary addition with one full-adder stage per bit, plus handling for the least significant bit. Carry propagation creates a delay that grows with word length.

Example. Adding 0110 and 0011 begins at the least significant bit and propagates carries left.

Exam point. Read carry direction from low significance to high significance.

Solved calculation. Add 10112+011021011_2+0110_2 using four bit positions.

  1. Bit 0: 1+0=11+0=1, carry 0.
  2. Bit 1: 1+1+0=1021+1+0=10_2, write 0, carry 1.
  3. Bit 2: 0+1+1=1020+1+1=10_2, write 0, carry 1.
  4. Bit 3: 1+0+1=1021+0+1=10_2, write 0, carry 1 beyond the word.
  5. Reading the carry and written bits gives 10001210001_2. Answer. 10112+01102=1000121011_2+0110_2=10001_2.

Carry generate and propagate

Definition. For bit ii, define generate Gi=AiBiG_i=A_iB_i and propagate Pi=Ai⊕BiP_i=A_i\oplus B_i (some conventions use Ai+BiA_i+B_i for carry propagation). Then Ci+1=Gi+PiCiC_{i+1}=G_i+P_iC_i and Si=Pi⊕CiS_i=P_i\oplus C_i. State the convention used when comparing formulas.

Example. If Ai=Bi=1A_i=B_i=1, then Gi=1G_i=1 and the output carry is 1 regardless of input carry.

Exam point. XOR-propagate and OR-propagate differ as signals, though both can be used in the carry equation under appropriate definitions.

Solved calculation. Compute the carry into bit 2 for two low-order bit pairs with A0B0=10A_0B_0=10, A1B1=11A_1B_1=11, and C0=1C_0=1.

  1. At bit 0, G0=0G_0=0, P0=1P_0=1, so C1=0+1⋅1=1C_1=0+1\cdot1=1.
  2. At bit 1, G1=1G_1=1, P1=0P_1=0, so C2=1+0⋅1=1C_2=1+0\cdot1=1.
  3. The second bit generates carry itself. Answer. C2=1C_2=1.

Comparator circuits

Definition. A magnitude comparator reports whether binary words are equal, less than, or greater than. Equality is the AND of bitwise XNOR results. For unsigned words, comparison is decided by the first differing bit when scanning from most significant to least significant.

Example. 10102>100121010_2>1001_2 because the first differing bit from the left is 1 versus 0.

Exam point. Compare from the most significant bit; lower bits matter only after all higher bits tie.

Solved calculation. Compare A=11010A=11010 and B=11100B=11100 as unsigned values.

  1. Bits 4 and 3 match: 1 and 1, then 1 and 1.
  2. At bit 2, A2=0A_2=0 and B2=1B_2=1.
  3. The first difference determines the comparison; lower bits are irrelevant.
  4. Thus A<BA<B. Answer. A<BA<B; equality output is 0.

Multiplexers

Definition. A 2k2^k-to-1 multiplexer selects one of its data inputs using kk select bits. The output equals the selected data value. For a 2-to-1 mux with select SS, Y=S′D0+SD1Y=S'D_0+SD_1.

Example. With S=1S=1, a 2-to-1 mux outputs D1D_1.

Exam point. Map select-bit values to data inputs in the order stated; reversed labels change the function.

Solved design. Implement F(A,B,C)=Σm(1,2,6,7)F(A,B,C)=\Sigma m(1,2,6,7) using a 4-to-1 mux with A,BA,B as selects and CC as the remaining data variable.

  1. Group minterms by select pair ABAB.
  2. For AB=00AB=00, rows 0 and 1 give output 0 when C=0C=0, 1 when C=1C=1; set D0=CD_0=C.
  3. For AB=01AB=01, rows 2 and 3 give 1,0; set D1=C′D_1=C'.
  4. For AB=10AB=10, rows 4 and 5 give 0,0; set D2=0D_2=0.
  5. For AB=11AB=11, rows 6 and 7 give 1,1; set D3=1D_3=1. Answer. Selects A,BA,B with D0=C,D1=C′,D2=0,D3=1D_0=C,D_1=C',D_2=0,D_3=1.

Implementing a function with a multiplexer

Definition. A Boolean function with nn inputs can be implemented by a mux using some inputs as selects and the remaining inputs to form data values. Each data input is obtained by fixing the select assignment and simplifying the residual function. Constants and complemented literals are valid mux data inputs.

Example. F(A,B)=A′BF(A,B)=A'B can use a 2-to-1 mux with select AA, data D0=B,D1=0D_0=B,D_1=0.

Exam point. Derive every data input from the truth table; do not guess the wiring from the expression's visual order.

Solved design. Use a 4-to-1 mux to implement F(A,B,C)=AB+CF(A,B,C)=AB+C with A,BA,B as select inputs.

  1. For AB=00AB=00, F=CF=C, so D0=CD_0=C.
  2. For AB=01AB=01, F=CF=C, so D1=CD_1=C.
  3. For AB=10AB=10, F=CF=C, so D2=CD_2=C.
  4. For AB=11AB=11, F=1+C=1F=1+C=1, so D3=1D_3=1.
  5. Connect the select lines in the specified order and use the four data functions. Answer. D0=D1=D2=CD_0=D_1=D_2=C, D3=1D_3=1.

Decoders

Definition. An nn-to-2n2^n decoder activates one output for each nn-bit input combination, assuming an active-high one-hot decoder. Each output is a minterm. Enable inputs may force all outputs inactive when the decoder is disabled; active-low devices reverse the output polarity.

Example. A 2-to-4 decoder output Y2Y_2 is 1 for input 10, so Y2=AB′Y_2=AB' when AA is most significant.

Exam point. Check whether outputs and enable are active-high or active-low.

You have read the free 29% of this note

Sign in with Google to keep reading. It is free, takes one tap, and you also get:

  • 6 practice questions from this note
  • Every note in full, plus the PDF library
  • Official past papers as timed tests, with explanations
  • An AI tutor for doubts, in Hindi or English
  • Your progress, mistakes and study plan saved on every device
Continue reading, free