Combinational Circuit Analysis and DesignIntroductionA combinational circuit is a digital system whose outputs depend only on the present values of its inputs. Unlike a sequential circuit, it has no internal memory and normally does not require a clock. Examples include arithmetic units, code converters, data selectors, address decoders, parity generators, and comparison circuits. The design of a combinational system is best treated as a specification-to-circuit process. The designer first identifies the required function, defines inputs and outputs, establishes the truth table or Boolean equations, simplifies the logic, selects an implementation technology, and verifies the result. This process is more reliable than directly attempting to draw gates from an informal description. Learning ObjectivesBy the end of this chapter, students should be able to: - Distinguish combinational circuits from sequential circuits.
- Apply a systematic process for analyzing and designing combinational systems.
- Derive and simplify Boolean expressions from specifications and truth tables.
- Explain and design adders, subtractors, comparators, encoders, decoders, multiplexers, demultiplexers, parity circuits, and code converters.
- Evaluate propagation delay, invalid inputs, active-low signals, and implementation limitations.
- Select an appropriate combinational building block for a practical digital system.
1. The Specification-to-Circuit ProcessA disciplined design procedure consists of the following stages: - Interpret the specification. Determine what the circuit must do, including valid input combinations, timing requirements, and exceptional conditions.
- Name the variables. Assign symbols to every input and output, and state whether a signal is active-high or active-low.
- Construct a truth table. List all relevant input combinations and the required output for each combination.
- Derive Boolean functions. Express each output as a sum of minterms, product of maxterms, or another suitable form.
- Simplify the functions. Use Boolean algebra, Karnaugh maps, or a computer-aided logic minimizer.
- Choose an implementation. Select gates, multiplexers, decoders, programmable logic, or integrated arithmetic blocks.
- Analyze hazards and timing. Consider propagation delay, fan-in, fan-out, and possible glitches.
- Verify the design. Test normal, boundary, unused, and invalid cases through simulation or hardware measurement.
For n binary inputs, a complete truth table has 2n possible input rows. This formula assumes that each input is independently either 0 or 1. If some combinations are impossible or irrelevant, they may be marked as don't-care conditions, but such conditions must be justified by the system specification. A Boolean function written in canonical sum-of-products form is constructed from minterms. For example, if output F is 1 on rows 1 and 3 of a two-input table, with inputs A and B, then: F = A'B + AB Here, the apostrophe denotes complementation, juxtaposition denotes AND, and + denotes OR. The expression simplifies to B. A simplified expression is preferable because it commonly requires fewer gates and has lower cost and delay. Analysis versus designAnalysis begins with a circuit and determines its behavior. The procedure is to label intermediate signals, write gate equations, substitute them into the output equations, and test representative input combinations. Design begins with a required behavior and produces a circuit. The designer moves in the opposite direction: specification → truth table → Boolean expression → simplified implementation → verification. 2. Arithmetic Circuits2.1 Half adderA half adder adds two one-bit operands, A and B. It produces a sum S and a carry C. The sum is 1 when exactly one input is 1, while the carry is 1 when both inputs are 1. The equations are: S = A ⊕ B C = AB The symbol ⊕ denotes exclusive OR. Thus, a half adder can be implemented with one XOR gate and one AND gate. It cannot add an incoming carry from a lower-order position, so it is insufficient by itself for general multi-bit addition. 2.2 Full adderA full adder adds three one-bit values: A, B, and an incoming carry Cᵢₙ. It produces a sum S and an outgoing carry Cₒᵤₜ. S = A ⊕ B ⊕ Cᵢₙ Cₒᵤₜ = AB + ACᵢₙ + BCᵢₙ The carry expression is 1 whenever at least two of the three inputs are 1. A full adder can be built from two half adders and an OR gate: - The first half adder adds A and B.
- The second half adder adds the first sum to Cᵢₙ.
- The two carry outputs are ORed.
2.3 Multi-bit additionSeveral full adders may be cascaded to form a ripple-carry adder. The carry from each bit position becomes the input carry of the next position. For an n-bit addition, the numerical relationship is: A + B + C₀ = S + 2ⁿCₙ where A and B are n-bit unsigned operands, C₀ is the initial carry, S is the n-bit sum, and Cₙ is the final carry. The final carry indicates an unsigned overflow beyond n bits. Ripple-carry addition is simple but slow because each stage may need to wait for the previous carry. If the worst-case carry delay of one stage is t_c and there are n stages, a simplified worst-case estimate is approximately: tdelay ≈ n tc This estimate assumes equal stages and a carry-dependent critical path. Faster architectures, such as carry-lookahead adders, compute carries using generate and propagate signals. For bit position i, define: Gᵢ = AᵢBᵢ Pᵢ = Aᵢ ⊕ Bᵢ Then: Cᵢ₊₁ = Gᵢ + PᵢCᵢ Gᵢ indicates that the position generates a carry independently; Pᵢ indicates that an incoming carry will propagate through the position. 2.4 SubtractorsA half subtractor subtracts B from A and produces a difference D and borrow Bᵣ. D = A ⊕ B Bᵣ = A'B A full subtractor also accepts an incoming borrow Bᵢₙ: D = A ⊕ B ⊕ Bᵢₙ Bₒᵤₜ = A'B + A'Bᵢₙ + BBᵢₙ In practical processors, subtraction is often performed using two's-complement addition. For n-bit operands: A − B = A + B' + 1 The complement B' is formed with NOT gates, and the initial carry input is set to 1. This permits one adder circuit to perform both addition and subtraction. A control input M can select the operation by conditionally complementing B and setting the initial carry to M. 3. Magnitude ComparatorsA comparator determines whether one binary number is greater than, equal to, or less than another. For one-bit values A and B, the outputs are: A > B = AB' A = B = A'B' + AB A < B = A'B For multi-bit unsigned numbers, comparison begins with the most significant bit. A difference at the first unequal position determines the result; lower-order bits are irrelevant. If A and B have n bits, equality can be expressed as: A = B = ∏ᵢ₌₀ⁿ⁻¹ (Aᵢ XNOR Bᵢ) The product symbol represents AND across all bit positions. A cascaded comparator must ensure that a lower-order comparison is considered only when all higher-order bits are equal. Comparators are used in address checking, threshold detection, sorting hardware, control systems, and digital measurement instruments. 4. Decoders and Encoders4.1 DecodersAn n-to-2ⁿ decoder activates one output corresponding to an n-bit input code. In a one-hot active-high decoder, exactly one output is 1 for each valid input combination. For a 2-to-4 decoder with inputs A and B: Y₀ = A'B' Y₁ = A'B Y₂ = AB' Y₃ = AB Many integrated decoders include an enable input. If enable E is active-high, all outputs may be forced inactive when E = 0. Designers must carefully check whether an actual device uses active-high or active-low outputs; a small circle or bar in a schematic commonly indicates inversion. Decoders support memory address selection, instruction decoding, display driving, chip selection, and implementation of arbitrary Boolean functions. A function can be implemented by ORing the decoder outputs associated with its 1-minterms. 4.2 EncodersAn encoder performs the reverse conceptual operation: it converts one active input among several into a binary code. A 4-to-2 encoder has four inputs and two outputs. Under the one-hot assumption: | Active input | Output Y₁Y₀ |
|---|
| D₀ | 00 | | D₁ | 01 | | D₂ | 10 | | D₃ | 11 |
The basic equations are: Y₁ = D₂ + D₃ Y₀ = D₁ + D₃ These equations assume that exactly one input is active. If multiple inputs may be active, the result is ambiguous. A priority encoder resolves this by assigning priority, usually to the highest-numbered or highest-order input. A valid output is often included to indicate whether any input is active. 5. Multiplexers and Demultiplexers5.1 MultiplexerA multiplexer (MUX) selects one of several data inputs and transfers it to a single output. A 2-to-1 MUX has data inputs D₀ and D₁, select input S, and output Y: Y = S'D₀ + SD₁ When S = 0, D₀ is selected; when S = 1, D₁ is selected. A 4-to-1 MUX uses two select lines and has the general form: Y = S₁'S₀'D₀ + S₁'S₀D₁ + S₁S₀'D₂ + S₁S₀D₃ A MUX can implement any Boolean function by connecting selected data inputs to 0, 1, or remaining variables. It is therefore both a data-routing component and a universal logic-implementation structure. 5.2 DemultiplexerA demultiplexer (DEMUX) routes one data input to one of several outputs. For a 1-to-4 DEMUX with data input D and select inputs S₁ and S₀: Y₀ = DS₁'S₀' Y₁ = DS₁'S₀ Y₂ = DS₁S₀' Y₃ = DS₁S₀ A DEMUX is useful for data distribution, channel selection, serial-to-parallel routing, and controlled activation of devices. 6. Parity CircuitsParity provides a simple method for detecting an odd number of bit errors. An even-parity generator produces a parity bit P such that the total number of 1s, including P, is even. For data bits D₃ through D₀: Peven = D₃ ⊕ D₂ ⊕ D₁ ⊕ D₀ An odd-parity generator is the complement: Podd = (D₃ ⊕ D₂ ⊕ D₁ ⊕ D₀)' At the receiving end, all data bits and the parity bit are XORed. For even parity, a result of 0 indicates that the received word has even parity; a result of 1 indicates a parity error under the assumption of no more than one bit error. Parity cannot identify the erroneous bit and cannot reliably detect an even number of bit errors. 7. Code ConvertersA code converter maps one binary representation to another. The design procedure is: - List the source-code combinations.
- Assign the corresponding destination code.
- Mark unused source combinations as invalid or don't-care only when the system can safely ignore them.
- Derive and simplify one Boolean function for each destination bit.
- Verify all valid combinations and define behavior for invalid combinations.
Binary-to-Gray conversionFor an n-bit binary word Bₙ₋₁…B₀, the corresponding Gray code Gₙ₋₁…G₀ is: Gₙ₋₁ = Bₙ₋₁ Gᵢ = Bᵢ₊₁ ⊕ Bᵢ, 0 ≤ i < n − 1 Gray code changes only one bit between adjacent numerical values, reducing transition ambiguity in rotary encoders and position sensors. The reverse conversion is cumulative XOR: Bₙ₋₁ = Gₙ₋₁ Bᵢ = Bᵢ₊₁ ⊕ Gᵢ BCD-to-seven-segment conversionA BCD-to-seven-segment converter accepts a 4-bit decimal code and drives seven outputs corresponding to segments a through g. The ten valid BCD combinations represent decimal digits 0 through 9; six combinations are invalid. Whether invalid combinations are blanked, displayed as a pattern, or treated as don't-cares must be explicitly specified. This example illustrates why a truth table is essential: each segment has its own Boolean function. 8. Hazards, Timing, and Real HardwareBoolean equivalence does not guarantee identical physical behavior. Gates have propagation delays, so signals that theoretically change simultaneously may arrive at different times. A temporary unwanted pulse is called a hazard. A static-1 hazard occurs when an output expected to remain 1 briefly falls to 0. A static-0 hazard occurs when an output expected to remain 0 briefly rises to 1. Consensus terms can sometimes be added to a two-level expression to remove a hazard, although the added term may increase hardware cost. Important practical considerations include: - Propagation delay: time between an input transition and the corresponding stable output.
- Fan-in: number of inputs connected to one gate.
- Fan-out: number of gate inputs driven by one output.
- Loading: electrical demand placed on a signal.
- Undefined inputs: floating CMOS inputs may produce unpredictable behavior and should not be left unconnected.
- Active-low conventions: signals such as RESET̅ or ENABLE̅ require careful interpretation.
- Overflow: arithmetic overflow must be distinguished from a carry-out. For signed two's-complement addition, overflow occurs when two operands with the same sign produce a result with the opposite sign.
Simulation should include transition timing, not merely steady-state truth-table checks, when the circuit drives clocks, asynchronous controls, memory enables, or safety-related outputs. 9. Detailed Application: Digital Access-Control PanelBackgroundConsider an illustrative access-control panel for a small laboratory. Four switches represent a 4-bit access code. The system must compare the entered code with a stored code, display whether the entry is equal, and route a confirmation signal to one of two doors. ProblemThe design requires: - A four-bit entered code E₃E₂E₁E₀.
- A four-bit stored code K₃K₂K₁K₀.
- An equality indicator Q.
- A valid-entry signal V generated when the code matches.
- A door-selection input S.
- Outputs D₀ and D₁, with the confirmation signal routed to the selected door.
The security requirement is that neither door output may be active unless the code is correct. Analysis and solutionFirst compare each entered bit with the corresponding stored bit using XNOR gates: Xᵢ = Eᵢ XNOR Kᵢ The equality output is the AND of all four comparisons: Q = X₃X₂X₁X₀ The valid-entry signal is Q. A 1-to-2 DEMUX then receives Q as its data input and S as its select input: D₀ = QS' D₁ = QS If the code is incorrect, Q = 0 and both door outputs are 0 regardless of S. If the code is correct, exactly one door output is active. VerificationSuppose the stored code is 1010 and the entered code is 1010. Every XNOR output is 1, so Q = 1. With S = 0, D₀ = 1 and D₁ = 0. If the entered code changes to 1000, the third comparison differs, making Q = 0; both door outputs become 0. Outcome and learning pointsThe design combines a comparator and a demultiplexer because the requirements naturally divide into two functions: decision and routing. The case also demonstrates a safety principle: authorization should be generated before routing, and the routing stage should receive only the authorized signal. In a real installation, the combinational logic would require additional measures such as debouncing, secure storage, fault detection, and a sequential lockout mechanism. 10. Design Best Practices and LimitationsGood combinational design begins with unambiguous specifications. Designers should define invalid states, signal polarity, numeric representation, timing assumptions, and reset behavior before simplifying equations. Modular blocks such as adders, MUXs, and decoders improve readability and verification. Hardware description languages and synthesis tools can translate Boolean or behavioral descriptions into gates. However, automated synthesis does not remove the need for engineering judgment. The designer remains responsible for checking signed versus unsigned arithmetic, inferred latches, unintended priority, timing constraints, and simulation-to-hardware differences. Combinational circuits also have limitations. They cannot remember previous events, filter switch bounce by themselves, or guarantee glitch-free outputs without suitable timing design. A circuit that controls physical actuators may therefore need sequential synchronization, registered outputs, watchdogs, and fail-safe logic. Chapter SummaryCombinational circuits produce outputs from present inputs and have no intended memory. Their design follows a specification-to-circuit process involving variable definition, truth-table construction, Boolean derivation, simplification, implementation, and verification. Half and full adders support binary arithmetic; subtractors and two's-complement methods support subtraction. Comparators establish equality and ordering. Decoders activate one output from a coded input, while encoders perform the reverse mapping. Multiplexers select data, and demultiplexers distribute it. XOR-based parity circuits detect many single-bit errors, while code converters translate between representations such as binary and Gray code. Practical designs must also account for propagation delay, hazards, active-low signals, invalid inputs, overflow, fan-out, and verification. The access-control example illustrates how several standard blocks can be composed into a reliable application-oriented system. Key TermsCombinational circuit: A circuit whose outputs depend only on present inputs. Truth table: A table listing outputs for specified input combinations. Minterm: A product term that represents one specific input combination. Half adder: A circuit that adds two bits and produces sum and carry. Full adder: A circuit that adds two bits and an incoming carry. Ripple-carry adder: A cascaded adder in which carries propagate between stages. Carry-lookahead adder: An adder that computes carries using generate and propagate logic. Two's complement: A binary representation commonly used for signed integers and subtraction. Comparator: A circuit that determines equality or relative magnitude. Decoder: A circuit that activates an output corresponding to an input code. Encoder: A circuit that converts an active input into a binary code. Priority encoder: An encoder that resolves multiple active inputs according to priority. Multiplexer: A circuit that selects one of several inputs. Demultiplexer: A circuit that routes one input to one selected output. Parity: A property indicating whether the number of 1 bits is even or odd. Code converter: A circuit that maps one digital representation to another. Hazard: An unwanted transient caused by unequal propagation delays. Fan-out: The number of inputs that one output can drive reliably. Propagation delay: The time required for a circuit output to respond to an input change. Don't-care condition: An input combination whose output may be chosen for convenient simplification, subject to system safety. Review QuestionsShort Answer Questions- How does a combinational circuit differ from a sequential circuit?
- Why cannot a half adder directly accept an incoming carry?
- What is the purpose of an enable input on a decoder?
- Why is a priority encoder needed when multiple inputs may be active?
- What type of error can parity commonly detect, and what important error limitation does it have?
Long Answer Questions- Explain the complete specification-to-circuit design process and illustrate each stage with a two-input Boolean function.
- Derive the sum and carry equations of a full adder and explain one method of implementing it with half adders.
- Compare ripple-carry and carry-lookahead adders in terms of structure, delay, and hardware complexity.
- Explain how a multiplexer can implement an arbitrary Boolean function.
- Describe the design of a binary-to-Gray code converter and explain why Gray code is useful in position sensing.
Analytical / Application Questions- Design a 2-bit equality comparator. Give the Boolean equation for equality and explain how the circuit behaves for equal and unequal inputs.
- A four-bit system uses even parity. Determine the parity bit for data 1011 and explain the receiver's parity check result when the received word is 10111.
- Design a circuit that adds two 4-bit unsigned numbers. Identify the required building blocks, explain carry propagation, and state how an unsigned overflow is indicated.
Multiple Choice Questions with AnswersQuestion 1Which equation correctly describes the carry output of a half adder? A. A ⊕ B B. AB C. A + B D. A'B Correct Answer: B. AB Question 2In a full adder, the sum output is: A. A + B + Cᵢₙ B. AB + Cᵢₙ C. A ⊕ B ⊕ Cᵢₙ D. A'B + BCᵢₙ Correct Answer: C. A ⊕ B ⊕ Cᵢₙ Question 3What is the principal limitation of a ripple-carry adder? A. It cannot add binary numbers B. It requires decimal inputs C. Carry propagation can produce a relatively long delay D. It produces no carry output Correct Answer: C. Carry propagation can produce a relatively long delay Question 4A 2-to-4 decoder normally has how many output lines? A. 2 B. 4 C. 6 D. 8 Correct Answer: B. 4 Question 5For a 2-to-1 multiplexer, which input is selected when S = 1? A. D₀ B. D₁ C. Both inputs simultaneously D. Neither input Correct Answer: B. D₁ Question 6What assumption is made by a basic 4-to-2 encoder? A. All inputs must be active B. Exactly one input is active C. No input can ever be active D. The inputs are analog voltages Correct Answer: B. Exactly one input is active Question 7For even parity, the parity bit for data 1011 is: A. 0 B. 1 C. 10 D. Cannot be determined Correct Answer: B. 1 Question 8Which gate operation is naturally used to generate parity? A. XOR B. AND only C. NOR only D. XNOR only Correct Answer: A. XOR Question 9In a binary-to-Gray converter, the most significant Gray bit is: A. Always 0 B. The complement of the most significant binary bit C. Equal to the most significant binary bit D. The XOR of all binary bits Correct Answer: C. Equal to the most significant binary bit Question 10Which condition is most directly associated with a static hazard? A. A permanent open circuit B. An unwanted temporary output transition caused by unequal delays C. A valid truth-table output D. An increase in the number of input variables Correct Answer: B. An unwanted temporary output transition caused by unequal delays
|