3.3.2 · D5Combinational Circuits

Question bank — Ripple-carry adder

1,858 words8 min readBack to topic
Figure — Ripple-carry adder

Every symbol used here comes straight from the parent note: are the three single bits going into one Full adder; is its sum bit; is its carry-out bit; are bit of the two numbers; is the carry entering stage ; is the final carry-out; is the time for a carry to cross one stage; is the word width in bits.

Figure — Ripple-carry adder
Figure — Ripple-carry adder
Figure — Ripple-carry adder

True or false — justify

True or false: the sum output and the carry output can each be built from XOR gates alone.
False — is XOR (odd parity), but is the majority function (AND-of-pairs OR'd together), which XOR cannot express because XOR flips at every extra 1 while majority only cares about crossing "at least two."
True or false: all full adders in a ripple-carry adder finish computing at the same instant.
False — the inputs arrive together, but each stage's correct waits for , so the top stage settles only after the carry ripples through, roughly (see the ripple figure and the timing waveform).
True or false: a carry-out of from the whole adder always means the answer is wrong.
False — for unsigned numbers means the true sum did not fit, but for signed Two's complement numbers can be on a perfectly correct result; signed overflow is .
True or false: the ripple-carry adder is a combinational circuit even though the carry "travels" through it.
True — "travels" describes propagation delay, not memory; the output is still purely a function of the current inputs, so it is a combinational circuit with no stored state.
True or false: swapping the two inputs and of a full adder changes its outputs.
False — both and are symmetric in and , so the full adder treats them interchangeably.
True or false: doubling the word width roughly doubles both the delay and the gate count of a ripple-carry adder.
True — delay is (linear) and area is one full adder per bit (linear), so both scale as ; the Carry-lookahead adder breaks the delay scaling, not the area.
True or false: setting instead of never affects the sum.
False — is a genuine input to bit 0; setting it to adds one to the total and is exactly the trick used with inverted to perform subtraction via Two's complement.
True or false: "generate" and "propagate" are two different physical wires, so a stage can do both at once.
Partly — generate (AND) and propagate (XOR) are distinct nets, but they can't both make a carry from the same incoming bit: propagate needs a carry to pass, generate makes one regardless, and OR's the two paths together (see the half-adder decomposition figure).

Spot the error

Spot the error: "Since uses XOR of all three bits, by symmetry."
XOR measures odd count of 1s; carry measures magnitude reaching 2. They agree at some rows and disagree at others (e.g. : XOR but carry), so must be the majority OR-of-ANDs, not XOR.
Spot the error: "The MSB sum bit is ready as soon as the input bits arrive, since all inputs enter together."
The MSB sum depends on , which chains back to ; the carry path is serial, so the MSB only settles after of Propagation delay — exactly the late-rising top trace in the timing figure.
Spot the error: "To subtract , invert and leave ."
Inverting (the NOT operation) gives the one's complement; you still need the , supplied by , so that . Leaving produces .
Spot the error: "For signed numbers, ignore and just check the MSB of the result to detect overflow."
The result MSB is the sign bit, not the overflow flag; correct signed Overflow detection compares the carry into the MSB with the carry out of it: .
Spot the error: "A carry-out in a 4-bit subtraction means the subtraction overflowed."
In Two's complement subtraction the extra is expected and simply discarded; a there signals a non-negative result, not overflow.
Spot the error: "Because RCA is delay, a 64-bit RCA is exactly twice as slow as a 32-bit one at any moment during the add."
The describes worst-case settling time, not a continuous ratio; the delay only matters once, when the longest carry chain is exercised, and constants and the LSB timing mean it's about double, not exactly.
Spot the error: "The half adder and full adder are the same thing since both add bits."
A Half adder adds only two bits and has no carry-in; a Full adder adds three (including ) and equals two half adders plus an OR gate on their two carry bits — exactly the wiring in the first figure.

Why questions

Why is the carry-out defined by "at least two 1s" rather than "the sum is large"?
Because three single bits sum to at most , and "≥ 2" is exactly the condition that the twos-place bit turns on; "at least two 1s" is the majority function that captures this.
Why can't we compute all the carries in parallel in a plain ripple-carry adder?
Each literally contains as an input, so the value isn't defined until the previous carry is known — a chained dependency the Carry-lookahead adder deliberately unrolls.
Why does the same hardware add and subtract with only a "subtract" control line?
A controlled XOR conditionally inverts each , and the subtract line also drives ; setting both to 1 turns into using Two's complement.
Why is gate count considered good while delay is considered bad?
Linear area means the circuit is small and cheap and regular; but linear delay means speed degrades directly with word width, which is unacceptable for wide fast processors — hence faster carry schemes.
Why does overflow use instead of just ?
Signed overflow happens when adding two same-sign numbers flips the sign bit wrongly; that flip occurs exactly when the carry into the MSB differs from the carry out of it, which is what the XOR detects.
Why do we say the carry "ripples" rather than "jumps"?
The correct carry cannot skip stages — it must be resolved at each bit before the next can resolve, so it moves like a wave one stage at a time from LSB to MSB (the arrow chain in the ripple figure).

Edge cases

Edge case: what does a full adder output when ?
and — the trivial zero row; both parity and majority agree that nothing happens.
Edge case: what does a full adder output when ?
Sum in decimal is , so (odd count) and (majority holds); this is the row that most clearly separates XOR from majority.
Edge case: what happens if but you are doing ordinary addition, not subtraction?
You get ; is a real operand, so a stray there silently adds one to your result — a common wiring bug.
Edge case: for a 1-bit "ripple-carry adder" (), is the ripple idea meaningful?
There is only one stage, so no carry rippling occurs; delay is a single and is the only carry-out — the degenerate case where RCA and a lone Full adder coincide.
Edge case: can signed overflow occur when adding two numbers of opposite sign?
No — adding a positive and a negative number always lands within range, so there; signed overflow requires two same-sign operands.
Edge case: what is the widest possible carry chain actually exercised when adding and with ?
Zero-length — every stage generates and propagates nothing, so no carry moves; the worst-case is a bound, not what every input pattern triggers.

Connections