A combinational logic circuit produces an output that depends only on the present combination of inputs, with no memory of the past. These building blocks, adders, multiplexers, decoders and their relatives, are the arithmetic and data-routing backbone of every digital system, and they account for a large, predictable share of marks in technical exams.
This article walks through the full combinational toolkit: how combinational differs from sequential logic, the standard design procedure, half and full adders and subtractors with their equations and truth tables, ripple-carry versus carry-look-ahead adders, multiplexers and how to implement any function with a MUX, demultiplexers, encoders and priority encoders, decoders, magnitude comparators, code converters, and parity generators and checkers. For Wireless PSI and GPSC papers, expect direct recall of these truth tables and Boolean equations, so study the tables here carefully.
Combinational vs Sequential Logic
In a combinational circuit the output is a pure function of the current inputs; the same input always gives the same output. In a sequential circuit the output depends on both current inputs and the stored past state, so it needs memory elements (flip-flops) and usually a clock.
| Feature | Combinational | Sequential |
|---|
| Memory | None | Present (flip-flops) |
| Output depends on | Present inputs only | Present inputs and past state |
| Clock | Not required | Usually required |
| Feedback | No feedback path | Has feedback |
| Examples | Adder, MUX, decoder | Counter, register, FSM |
Exam tip: the single distinguishing keyword is memory. If a circuit has no storage and no feedback, it is combinational.
Combinational Design Procedure
The standard method to design any combinational circuit follows a fixed sequence.
- State the problem and identify the number of inputs and outputs.
- Construct the truth table relating outputs to all input combinations.
- Derive the simplified Boolean expression for each output using a K-map or algebra.
- Draw the logic diagram from the simplified expressions.
Common mistake: simplifying before writing the complete truth table. Always tabulate every input combination first so no case is missed.
Half Adder and Full Adder
A half adder adds two single bits A and B, producing a Sum and a Carry. It cannot accept a carry-in, which limits it to the least significant bit.
Sum = A ⊕ B, Carry = A . BHalf adder: Sum is XOR, Carry is AND of the two inputs
| A | B | Sum | Carry |
|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
A full adder adds three bits, A, B and a carry-in C(in), giving a Sum and a carry-out C(out). It can be built from two half adders and an OR gate.
Sum = A ⊕ B ⊕ C(in)Full adder: Sum is the XOR of all three inputs
C(out) = AB + B.C(in) + A.C(in)Full adder carry-out in minimised SOP form
| A | B | C(in) | Sum | C(out) |
|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Exam tip: the full-adder Sum is 1 when an odd number of inputs are 1 (an XOR of three variables), and C(out) is 1 when two or more inputs are 1 (the majority function).
Half Subtractor and Full Subtractor
A half subtractor computes A minus B, giving a Difference and a Borrow. Note the borrow term carries a complement on A.
Difference = A ⊕ B, Borrow = A' . BHalf subtractor: Difference is XOR, Borrow is A bar AND B
| A | B | Difference | Borrow |
|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
A full subtractor handles a borrow-in B(in) as well.
Difference = A ⊕ B ⊕ B(in)Full subtractor: Difference is the XOR of all three inputs
Borrow = A'B + A'.B(in) + B.B(in)Full subtractor borrow-out
Exam tip: the Difference equation of the subtractor is identical in form to the adder Sum (XOR of all inputs); only the Borrow differs from Carry, mainly by the complement on A. Common mistake: writing Borrow = AB' instead of A'B; the borrow occurs when A is 0 and B is 1.
Ripple-Carry vs Carry-Look-Ahead Adders
An n-bit ripple-carry adder chains n full adders, feeding each carry-out into the next stage. It is simple but slow because the final carry must ripple through every stage, so the worst-case delay grows linearly with n.
A carry-look-ahead (CLA) adder removes this bottleneck by computing all carries in parallel from generate and propagate signals: generate G(i) = A(i).B(i) and propagate P(i) = A(i) XOR B(i). Each carry is then formed directly without waiting for the previous stage.
| Feature | Ripple-carry | Carry-look-ahead |
|---|
| Speed | Slow, delay grows with n | Fast, nearly constant |
| Hardware | Simple, less gates | Complex, more gates |
| Carry path | Serial ripple | Parallel computation |
| Cost | Low | Higher |
Exam tip: CLA trades extra hardware for speed; the keywords generate and propagate signal a CLA question.
Multiplexer and Demultiplexer
A multiplexer (MUX) is a data selector: it routes one of 2(power n) data inputs to a single output, chosen by n select lines. A demultiplexer (DEMUX) does the reverse, sending one input to one of 2(power n) outputs.
Y = S'.I0 + S.I12-to-1 MUX: S selects between inputs I0 and I1
Implementing Functions with a MUX
A MUX can realise any Boolean function. With an n-variable function, an n-select (2 to the n input) MUX works by tying each data input to 0 or 1 per the truth table. More efficiently, a 2 to the (n minus 1) input MUX uses (n minus 1) variables as select lines and feeds each data input with 0, 1, the last variable, or its complement.
Exam tip: a single 8-to-1 MUX (3 select lines) can implement any 3-variable function directly, or any 4-variable function using the fourth variable and its complement on the data inputs. A DEMUX with all data input held at 1 behaves exactly like a decoder.
Encoders, Priority Encoders and Decoders
A decoder converts an n-bit binary code into one active line out of 2(power n) outputs; for any input only one output is high. An encoder performs the inverse, converting 2(power n) input lines into an n-bit code.
An ordinary encoder fails if two inputs are active at once. A priority encoder solves this by assigning a priority, so when several inputs are high it outputs the code of the highest-priority active input. Common mistake: assuming an ordinary encoder handles multiple simultaneous inputs; only the priority encoder resolves that ambiguity.
| Device | Inputs | Outputs | Role |
|---|
| Decoder | n | 2 to the n | Code to one-hot line |
| Encoder | 2 to the n | n | One active line to code |
| Priority encoder | 2 to the n | n | Highest active input to code |
| MUX | 2 to the n data, n select | 1 | Many to one (select) |
| DEMUX | 1 data, n select | 2 to the n | One to many (distribute) |
Exam tip: a decoder with an enable input doubles as a DEMUX, and a 3-to-8 decoder produces all 8 minterms of three variables, which makes it handy for implementing functions with an OR gate.
Comparators, Code Converters and Parity Circuits
Magnitude Comparator
A magnitude comparator compares two numbers A and B and asserts one of three outputs: A greater than B, A equal to B, or A less than B. For a 1-bit comparator, equality is detected by the XNOR function, A equals B when A XNOR B is 1.
Code Converters
Code converters translate one binary code to another, for example binary to Gray or BCD to binary. For binary to Gray code, the most significant bit is copied and each remaining Gray bit is the XOR of adjacent binary bits.
G(i) = B(i+1) ⊕ B(i)Binary to Gray: MSB copied, each lower Gray bit is XOR of adjacent binary bits
Parity Generator and Checker
A parity generator adds a parity bit so the total number of 1s is even (even parity) or odd (odd parity); it is built from XOR gates. A parity checker at the receiver recomputes parity and flags an error if it disagrees. Exam tip: the even-parity bit equals the XOR of all data bits, and simple parity detects any single-bit (odd number of) error but cannot correct it.
- Combinational circuits have no memory; output depends only on present inputs, unlike sequential circuits which need flip-flops and a clock.
- Half adder: Sum = A XOR B, Carry = AB. Full adder Sum = A XOR B XOR C(in); carry-out is the majority of the three inputs.
- Subtractor Difference matches the adder Sum form; half-subtractor Borrow = A bar . B (note the complement on A).
- Ripple-carry is simple but slow; carry-look-ahead uses generate and propagate signals to compute carries in parallel.
- A MUX selects one of 2 to the n inputs and can implement any Boolean function; a DEMUX with data held high acts as a decoder.
- A priority encoder resolves multiple active inputs; a decoder with enable works as a DEMUX; parity uses XOR and detects single-bit errors only.
Practice MCQs
Q1. Which feature most clearly distinguishes a sequential circuit from a combinational circuit?
- A.It uses logic gates
- B.It has memory elements and feedback
- C.It produces a binary output
- D.It can be drawn as a truth table
Correct Answer: B
Explanation: Sequential circuits contain memory (flip-flops) and feedback, so the output depends on past state as well as present inputs. Combinational circuits have no memory and no feedback.
Q2. For a half adder with inputs A and B, the Sum and Carry outputs are:
- A.Sum = A AND B, Carry = A XOR B
- B.Sum = A XOR B, Carry = A AND B
- C.Sum = A OR B, Carry = A AND B
- D.Sum = A XOR B, Carry = A OR B
Correct Answer: B
Explanation: A half adder produces Sum = A XOR B and Carry = A . B. The carry is high only when both inputs are 1, which the AND gate detects.
Q3. In a full adder, the carry-out C(out) is logic 1 when:
- A.All three inputs are 1
- B.Exactly one input is 1
- C.Two or more inputs are 1
- D.No input is 1
Correct Answer: C
Explanation: C(out) = AB + B.C(in) + A.C(in), the majority function, which is 1 whenever at least two of the three inputs are 1.
Q4. The Borrow output of a half subtractor computing A minus B is:
- A.A . B
- B.A bar . B
- C.A . B bar
- D.A XOR B
Correct Answer: B
Explanation: A borrow is needed when A is 0 and B is 1, so Borrow = A bar . B. The Difference is A XOR B. Writing A . B bar reverses the condition and is wrong.
Q5. A carry-look-ahead adder achieves higher speed than a ripple-carry adder by:
- A.Using fewer gates
- B.Computing all carries in parallel from generate and propagate signals
- C.Adding one bit at a time serially
- D.Removing the carry entirely
Correct Answer: B
Explanation: The CLA computes generate (A.B) and propagate (A XOR B) signals and uses them to form all carries simultaneously, avoiding the serial ripple delay at the cost of more hardware.
Q6. How many select lines are required for a 16-to-1 multiplexer?
Correct Answer: C
Explanation: A 2 to the n to 1 MUX needs n select lines. For 16 inputs, 2 to the 4 equals 16, so 4 select lines are required.
Q7. What advantage does a priority encoder have over an ordinary encoder?
- A.It uses fewer gates
- B.It resolves the case where two or more inputs are active simultaneously
- C.It converts binary to one-hot outputs
- D.It requires no enable input
Correct Answer: B
Explanation: An ordinary encoder gives a wrong output if multiple inputs are active. A priority encoder assigns priorities and outputs the code of the highest-priority active input, resolving the ambiguity.
Q8. A 3-to-8 line decoder with an enable input can also be used as a:
- A.Multiplexer
- B.Demultiplexer
- C.Flip-flop
- D.Magnitude comparator
Correct Answer: B
Explanation: A decoder with an enable line functions as a 1-to-8 demultiplexer: the enable acts as the single data input, and the address lines select which output it is routed to. A decoder also generates all minterms for function implementation.