Half and full adders and subtractors, ripple-carry and carry look-ahead adders with their delays, 2's complement adder-subtractor and overflow, BCD adder, magnitude comparators and array multipliers.
In minterms, (odd number of 1s) and (two or more 1s, the majority function).
Full adder from two half adders. HA1 forms and ; HA2 adds to give and ; an OR gate combines the two carries. Note that and can never both be 1, so an XOR in place of the OR also works.
Half and full subtractor. For :
Circuit
Difference
Borrow out
Half subtractor
Full subtractor
The difference has the same form as the sum; only the borrow differs (it uses where the carry uses ).
NAND-only counts often asked: a half adder needs 5 two-input NAND gates and a full adder needs 9.
Full adder built from two half adders and an OR gate. HA1 adds A and B; HA2 adds the carry-in to their sum bit S1.
2. Ripple-carry adder and its delay
An -bit ripple-carry adder (RCA) chains full adders: the carry-out of stage is the carry-in of stage . It is simple and uses only full adders, but it is slow, because the carry may have to pass through every stage (for example ).
Worst-case delay. If each full adder produces its carry after its inputs are valid and its sum after its carry-in arrives, then with all , , applied together:
is ready at , at .
waits for , so it is ready at .
is ready at .
At gate level, with , each stage adds 2 gate delays (AND then OR) to the carry path, so an -bit RCA needs about gate delays. The delay grows linearly with .
Always read how the question defines the delays (from inputs or from carry-in, sum or carry) and trace the longest path; do not just apply the formula.
4-bit ripple-carry adder: each full adder passes its carry to the next stage on its left.
3. Carry look-ahead adder
A carry look-ahead adder (CLA) computes all carries directly from the inputs. For each bit define
Then . Expanding:
Each carry is a two-level AND-OR expression, and .
Delay (counting each gate, including XOR, as one delay): and in 1, all carries in 3, all sums in 4, independent of .
Cost. needs AND gates with up to inputs and an OR gate with inputs, so fan-in and gate count grow quickly. In practice CLA blocks of 4 bits are used and joined in a ripple or a second look-ahead level.
also gives correct carries (when both are 1, already makes the carry 1), but the sum then needs separately.
Adder
Hardware
Carry delay
Ripple carry
full adders
grows as
Carry look-ahead
grows faster than (large fan-in)
constant (about 3 gate delays)
4. Adder-subtractor, overflow and BCD adder
2's complement adder-subtractor. . Put an XOR gate on each with a control line that also drives :
: XOR passes , , output .
: XOR inverts , , output .
Overflow in signed -bit addition happens when two numbers of the same sign give a result of the other sign. In hardware:
(the carry out of the MSB differs from the carry into it). Adding numbers of opposite signs never overflows. For unsigned addition, itself signals overflow.
BCD adder. Add two BCD digits with a 4-bit binary adder, giving carry and sum . If the result is more than 9, add (6) to skip the six unused codes. The correction (and the decimal carry) is
A second 4-bit adder adds to the sum. So one BCD digit stage uses two 4-bit adders and a small correction circuit.
Example: : binary sum (15 > 9), add to get , that is BCD = 15.
5. Magnitude comparator and array multiplier
1-bit comparator: , , (XNOR).
-bit comparator. Let (1 when bit is equal). Compare from the MSB down; the first unequal bit decides. For 4 bits:
is the same with in place of .
Exactly one of the three outputs is 1 at any time.
Array multiplier. Multiplying an -bit number by an -bit number:
partial-product bits need AND gates;
the shifted rows are summed by adders of bits each;
the product has bits (largest value ).
2-bit by 2-bit multiplier: ; with carry ; ; . It uses 4 AND gates and 2 half adders.
Multiplying by needs no hardware: it is a left shift by places.
Formulas to remember
Full adder sum
Full adder carryMajority function,
Generate and propagate
Ripple-carry worst-case delay: carry delay per stage, : carry-in to sum delay (when )
Signed overflow
BCD correctionIf C = 1, add 0110 to the binary sum
Array multiplier size
Common mistakes
Using n times the carry delay for the last sum bit; the last sum needs only n − 1 carry delays plus one sum delay.
Taking the final carry C4 as the overflow flag in signed addition; signed overflow is C4 XOR C3.
In a BCD adder, correcting only when the 4-bit sum exceeds 1001 and forgetting the case where the binary adder itself produces a carry (sums 16 to 19).
Writing the borrow of a subtractor as AB' instead of A'B (for A minus B).
In a magnitude comparator, testing a lower bit without the condition that all higher bits are equal.
Counting n full adders for an m by n array multiplier; it needs n − 1 adders of m bits each.
Worked examples
Try each step yourself, then reveal the working.
Example 1: Worst-case delay of an 8-bit ripple-carry adder
numerical
An 8-bit ripple-carry adder is built from full adders. In each full adder the carry-out is valid 2 ns after its inputs (including carry-in) are valid, and the sum is valid 3 ns after its carry-in is valid. All , and are applied at . Find the time after which all outputs are valid.
Step 1: When is each carry ready?
Try it on paper first.
Example 2: Subtraction and overflow in a 4-bit adder-subtractor
numerical
A 4-bit 2's complement adder-subtractor has and . Find the output and the overflow flag for (a) (subtract) and (b) (add).
Step 1: For M = 1, what does the adder actually add?
Try it on paper first.
Example 3: Adding two BCD numbers
numerical
Add the BCD numbers (58) and (27) using BCD adder stages. How many times is the correction 0110 added?
Step 1: Add the units digits first.
Try it on paper first.
Example 4: Designing a 2-bit by 2-bit multiplier
conceptual
Design a multiplier for using AND gates and half adders, and check it for , .
Step 1: Write the partial products as in long multiplication.
Try it on paper first.
Previous year questions
1 official GATE EC question on this topic, newest first.
9 questions: up to 1 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.
Mark as mastered
Loading your progress…
My revision notes
Notes written by the GATEiit team against the official GATE EC syllabus; being checked by a reviewer. Updated 2026-11-29. Spotted a mistake? Use Report an issue on any question, or contact us.