Intuition What this page is for
The parent note gave you the equations. Here we stress-test them against every kind of input a real adder can meet: all-zeros, all-ones, one bit high, a carry rippling through, a full multi-column addition, and even subtraction dressed up as addition. If you can predict all of these, you truly own the circuit.
Before we touch numbers, one reminder of the tools, spelled out so nobody is lost:
Definition The Boolean gates we lean on
⊕ (read "XOR ", exclusive-OR) outputs 1 when its inputs differ . Picture two light switches: the lamp is on only when one switch is up and the other down. See XOR gate .
⋅ (read "AND ") outputs 1 only when both inputs are 1 — both switches up. See AND gate .
Juxtaposition means AND too: writing two symbols side by side, like A B , is just shorthand for A ⋅ B . So A B , A C in , B C in are all AND-products. We use this compact form in the carry equation only because it is standard; it never means multiply-then-something-else.
+ (read "OR ") outputs 1 when at least one input is 1 . See OR gate .
Danger: inside Boolean algebra + means OR, not arithmetic plus.
Common mistake Two different meanings of "
+ " on this page
Why it confuses: the same key does two jobs.
The rule we follow: inside a Boolean equation (e.g. C o u t = A B + A C in + B C in ) the "+ " is OR . Inside an arithmetic column written as decimal digits (e.g. "1 + 1 + 0 " in the ripple examples) the "+ " is ordinary counting — we are literally adding the bits' numeric values to see how many 1s there are. We will always say "column" or show it as a boxed addition when we mean the arithmetic one.
Recall the equations we are testing (from the parent), now with A B read as A ⋅ B :
Half: S = A ⊕ B , C = A ⋅ B
Full: S = A ⊕ B ⊕ C in , C o u t = A B + A C in + B C in
The schematics below show both cells at gate level. Keep them beside you as we work — every example below points back to a specific gate in these pictures, so you can see which wire fired.
The half-adder schematic (above) has exactly two gates: the XOR on top drives the Sum wire, the AND below drives the Carry wire. Examples 2 and 3 are literally "which of these two gates lights up?"
The full-adder schematic (above) is two half adders plus one OR on the carries. In Examples 4 and 5, watch the amber OR output: it fires whenever either half-adder carry (C 1 from HA1 or C 2 from HA2) is 1 — that is the majority rule made physical.
Every input situation a single adder cell (or a chain of them) can face falls into one of these classes. Each worked example below is tagged with the cell it covers.
Cell
Case class
What makes it special
Covered by
Z
All inputs zero (degenerate)
Nothing to add — outputs must stay 0
Ex 1
H1
Half adder, exactly one input high
The "carry must NOT fire" case
Ex 2
H2
Both HA inputs high
The classic 1 + 1 = 10 carry
Ex 3
F1
Full adder, exactly one input high
Only the incoming carry (or one bit) is 1 → S = 1 , no carry-out
Ex 6 (col 2)
F-even
Full adder, even count of 1s with a carry
Two 1s → S = 0 yet carry-out still fires (majority)
Ex 4
F-max
Full adder, all three high (limit)
Largest single-cell output = 1 1 2 = 3
Ex 5
Ripple
Multi-column chain, carry propagates far
C o u t of one feeds C in of next
Ex 6
Overflow
Chain result outgrows its bit-width
The leftmost carry escapes
Ex 7
Word
Real-world word problem
Translate a story into adder cells
Ex 8
Twist
Exam trap / subtraction reuse
Adder doing subtraction via two's complement
Ex 9
Worked example Ex 1 — Cell Z: the empty column (
A = 0 , B = 0 , C in = 0 )
Feed a full adder all zeros.
Forecast: guess ( C o u t , S ) before reading on.
S = 0 ⊕ 0 ⊕ 0 . Why this step? XOR outputs 1 only for an odd count of 1s; here the count is 0 (even), so S = 0 .
C o u t = 0 ⋅ 0 + 0 ⋅ 0 + 0 ⋅ 0 = 0 (each "+ " here is OR). Why this step? Each AND-product needs two 1s to fire; none are present.
Answer: ( C o u t , S ) = ( 0 , 0 ) = 0 .
Verify: arithmetic column 0 + 0 + 0 = 0 , and 0 in 2-bit binary is 00 . ✓ A degenerate input must give a degenerate output — the circuit does nothing, exactly right.
Worked example Ex 2 — Cell H1: one bit high, carry must stay silent (
A = 0 , B = 1 , half adder)
This is the case people get wrong (they expect OR-style carry). In the first schematic , watch the XOR gate light up and the AND gate stay dark.
Forecast: what is the carry?
S = 0 ⊕ 1 = 1 . Why this step? The inputs differ , so XOR fires — that is the top gate in the schematic. This is the digit we write.
C = 0 ⋅ 1 = 0 . Why this step? AND needs both bits high; only one is, so the bottom (Carry) gate stays at 0. Adding 0 and 1 gives 1, which fits in a single column — nothing spills over.
Answer: ( C , S ) = ( 0 , 1 ) = 1 .
Verify: arithmetic column 0 + 1 = 1 ; in binary that is 01 . ✓ Note how AND (not OR) protects us here: OR would have wrongly reported a carry.
Worked example Ex 3 — Cell H2: the classic overflow of a column (
A = 1 , B = 1 , half adder)
The reason the two outputs exist at all. In the first schematic , now the AND gate lights up and XOR goes dark.
Forecast: which output is 1, which is 0?
S = 1 ⊕ 1 = 0 . Why this step? Equal inputs do not differ, so the XOR (Sum) gate gives 0.
C = 1 ⋅ 1 = 1 . Why this step? Both high → the AND (Carry) gate fires. This 1 is carried to the next column.
Answer: ( C , S ) = ( 1 , 0 ) = 1 0 2 = 2 .
Verify: arithmetic column 1 + 1 = 2 , and 2 = 1 0 2 . ✓ The Sum shows the low bit, the Carry the high bit — precisely the two-bit answer the parent promised.
Worked example Ex 4 — Cell F-even: even count, yet a carry fires (
A = 1 , B = 0 , C in = 1 )
Now a carry arrives from the previous column. There are two 1s here — an even count — so watch the surprise. In the second schematic , trace C 2 from HA2 into the amber OR.
Forecast: does C o u t fire even though A and B are never both 1?
S = 1 ⊕ 0 ⊕ 1 = 0 . Why this step? Two of the three inputs are 1 — an even count — so XOR lands back at 0. (Trace it: 1 ⊕ 0 = 1 , then 1 ⊕ 1 = 0 .)
C o u t = A B + A C in + B C in = ( 1 ⋅ 0 ) + ( 1 ⋅ 1 ) + ( 0 ⋅ 1 ) = 0 + 1 + 0 = 1 ("+ " = OR). Why this step? Majority rules: at least two inputs are 1 (here A and C in ), so the carry fires even though A ⋅ B alone did not. In the schematic this is HA2's carry C 2 = ( A ⊕ B ) C in feeding the OR.
Answer: ( C o u t , S ) = ( 1 , 0 ) = 1 0 2 = 2 .
Verify: arithmetic column 1 + 0 + 1 = 2 = 1 0 2 . ✓ Key lesson: an even number of 1s gives S = 0 , but a carry can still be born from the incoming carry , not just from A and B .
Worked example Ex 5 — Cell F-max: the limiting case, everything high (
A = 1 , B = 1 , C in = 1 )
The largest number one cell can output. In the second schematic , both half-adder carries (C 1 and C 2 ) are 1, so the amber OR is firmly on.
Forecast: three 1s added — what's the biggest possible cell result?
S = 1 ⊕ 1 ⊕ 1 = 1 . Why this step? Three is an odd count, so XOR ends at 1. (Trace: 1 ⊕ 1 = 0 , then 0 ⊕ 1 = 1 .)
C o u t = ( 1 ⋅ 1 ) + ( 1 ⋅ 1 ) + ( 1 ⋅ 1 ) = 1 ("+ " = OR). Why this step? All three AND-products are 1; OR of them is 1. Majority is overwhelmingly met.
Answer: ( C o u t , S ) = ( 1 , 1 ) = 1 1 2 = 3 .
Verify: arithmetic column 1 + 1 + 1 = 3 = 1 1 2 . ✓ This is the ceiling: no single full adder can output more than 3 , because its three inputs are each at most 1, so their count tops out at three ones = 1 1 2 = 3 .
Now we chain cells. The picture below shows three full adders wired in a row — study which wire carries what before the next examples.
Worked example Ex 6 — Cells Ripple + F1:
A = 01 1 2 + B = 00 1 2 (three-bit chain)
Columns numbered from the right, starting at 0. Initial carry into column 0 is 0 . Column 2 below is the F1 edge case (exactly one input — the incoming carry — is high). (All "+ " inside a column below are arithmetic additions of bit values.)
Forecast: guess the 3-bit result and whether a 4th carry escapes.
Column 0: A 0 = 1 , B 0 = 1 , C in = 0 . S 0 = 1 ⊕ 1 ⊕ 0 = 0 , C o u t = 1 ⋅ 1 = 1 . Why? Both bits high → carry born, digit 0.
Column 1: A 1 = 1 , B 1 = 0 , C in = 1 (the carry from step 1). S 1 = 1 ⊕ 0 ⊕ 1 = 0 , C o u t = ( 1 ⋅ 0 ) + ( 1 ⋅ 1 ) + ( 0 ⋅ 1 ) = 1 . Why? Majority (A 1 and incoming carry) fires again — the carry ripples .
Column 2 (Cell F1): A 2 = 0 , B 2 = 0 , C in = 1 . S 2 = 0 ⊕ 0 ⊕ 1 = 1 , C o u t = 0 . Why? This is the exactly-one-1 full-adder case: only the incoming carry is high — odd count → S = 1 ; no pair of 1s → carry dies here.
Answer: result bits S 2 S 1 S 0 = 10 0 2 = 4 , final carry 0 .
Verify: arithmetic 3 + 1 = 4 = 10 0 2 . ✓ This is exactly a Ripple-carry adder : each C o u t becomes the next C in .
Worked example Ex 7 — Cell Overflow: the carry that escapes (
A = 11 1 2 + B = 00 1 2 , 3-bit)
What if the answer needs a 4th bit but we only have three columns? (Column "+ " = arithmetic.)
Forecast: will the sum fit in 3 bits?
Column 0: bits 1 + 1 + 0 : S 0 = 0 , carry = 1 . Why? 1 ⊕ 1 = 0 ; both high → carry.
Column 1: bits 1 + 0 + 1 : S 1 = 0 , carry = 1 . Why? Even count → S = 0 ; majority (A 1 , carry-in) → carry.
Column 2: bits 1 + 0 + 1 : S 2 = 0 , carry = 1 . Why? Same as column 1 — carry keeps rippling all the way out.
The escaping carry is the 4th bit: C o u t = 1 .
Answer: full result C o u t S 2 S 1 S 0 = 100 0 2 = 8 . If the register is only 3 bits wide, the stored value is 00 0 2 = 0 and the final carry is a carry/overflow flag .
Verify: arithmetic 7 + 1 = 8 = 100 0 2 . ✓ Lesson: a fixed-width adder can overflow ; the leftmost C o u t tells you it happened.
Worked example Ex 8 — Cell Word: a real-world tally
A vending machine counts coins with a 4-bit register. It currently holds 9 coins (100 1 2 ) and 6 more (011 0 2 ) drop in at once. Using full adders per column, what does the register read, and does it overflow 4 bits? (Column "+ " = arithmetic.)
Forecast: 9 + 6 = 15 — will it fit in 4 bits (max 15 )?
Col 0: bits 1 + 0 + 0 : S 0 = 1 , carry 0 . Why? One 1, odd → S = 1 ; no pair → no carry.
Col 1: bits 0 + 1 + 0 : S 1 = 1 , carry 0 . Why? Same shape as col 0.
Col 2: bits 0 + 1 + 0 : S 2 = 1 , carry 0 . Why? Same.
Col 3: bits 1 + 0 + 0 : S 3 = 1 , carry 0 . Why? One 1 → S = 1 ; no carry escapes.
Answer: register = S 3 S 2 S 1 S 0 = 111 1 2 = 15 , no overflow.
Verify: arithmetic 9 + 6 = 15 = 111 1 2 , and 15 ≤ 15 so it fits exactly at the limit. ✓ One coin more would overflow — the register sits right at its ceiling.
Worked example Ex 9 — Cell Twist: an adder doing
subtraction (5 − 3 in 4-bit two's complement)
The exam favourite: the same full-adder chain performs subtraction if we feed it the two's complement of the number being subtracted, with C in = 1 at column 0. (Column "+ " = arithmetic.)
Forecast: compute 5 − 3 and predict the final carry (a hint about sign).
Represent operands: 5 = 010 1 2 , 3 = 001 1 2 . Why this step? We add 5 and ( − 3 ) ; − 3 needs a two's-complement form. See Two's complement subtraction .
Form − 3 : invert 0011 → 1100 , then add 1 → 110 1 2 . Why? Two's complement of x is (flip all bits) + 1 ; that value acts like − 3 in modular addition.
Add with C in = 1 already folded in (the + 1 above did it). Add 0101 + 1101 column by column:
Col 0: bits 1 + 1 + 0 : S 0 = 0 , carry 1 .
Col 1: bits 0 + 0 + 1 : S 1 = 1 , carry 0 .
Col 2: bits 1 + 1 + 0 : S 2 = 0 , carry 1 .
Col 3: bits 0 + 1 + 1 : S 3 = 0 , carry 1 (escapes).
Why each? Ordinary full-adder rules; nothing new — that's the whole point.
Discard the escaping 4th carry. Why? In two's-complement subtraction the final carry-out is expected and simply dropped; a carry-out of 1 here signals the result is non-negative .
Answer: result bits S 3 S 2 S 1 S 0 = 001 0 2 = 2 .
Verify: arithmetic 5 − 3 = 2 = 001 0 2 . ✓ The adder never changed — only what we fed it did. This is why one circuit family serves both + and − .
Common mistake "In a ripple chain, only column 0 can produce a carry."
Why it feels right: carries seem to start where the biggest sum (1 + 1 ) happens.
The trap: Ex 6 & 7 show a carry can be created in the middle purely from an incoming carry (majority of A /B /C in ).
Fix: every column runs the full majority carry rule, incoming carry included.
Common mistake "If the final carry-out is 1, the addition is wrong."
Why it feels right: a leftover carry looks like an error.
The trap: in fixed-width addition (Ex 7) that carry is a valid overflow flag ; in subtraction (Ex 9) it is expected and dropped .
Fix: the meaning of the final C o u t depends on context — width limit vs. two's complement.
Recall Rebuild the matrix (say the "why" out loud each time)
Cover the answers and re-derive ( C o u t , S ) for: all-zeros, one-high, both-high, all-three-high. Then chain 011 + 001 .
All-zeros — why? ::: Count of 1s is 0 (even) so XOR gives S = 0 ; no AND-product fires so C = 0 . Answer ( 0 , 0 ) = 0 .
Both-high half adder — why? ::: Equal bits don't differ so XOR gives S = 0 ; both high so AND fires C = 1 . Answer ( 1 , 0 ) = 2 .
Full adder with even count (two 1s) — why? ::: Two is even so XOR gives S = 0 ; but two 1s meet the majority so C o u t = 1 . Answer ( 1 , 0 ) = 2 .
All-three-high full adder — why? ::: Three is odd so XOR gives S = 1 ; at least two 1s so majority gives C o u t = 1 . Answer ( 1 , 1 ) = 3 .
01 1 2 + 00 1 2 — why? ::: Carry born in col 0, ripples through col 1 (majority), dies in col 2 (only one 1). Answer 10 0 2 = 4 .
5 − 3 via two's complement — why? ::: Add 5 to two's complement of 3 ; ordinary adder rules; drop the escaping carry (result non-negative). Answer 001 0 2 = 2 .
Mnemonic The two-line summary
Sum = XOR (odd count of 1s). Carry = majority (≥ two 1s). Every example above is just these two rules applied to different inputs.