Exercise 3: Why Two Separate Circuits Would Likely Need More Gates — Possible Solution ==================================================================== THIS CHAPTER'S OWN GATE COUNT FOR THE COMBINED CIRCUIT ------------------------------ 15 gates for the three full adders (5 gates each) + 3 gates for the mode-select XORs + 1 gate for overflow detection = 19 gates total, covering BOTH addition and subtraction plus overflow checking. WHAT A DEDICATED ADDER-ONLY CIRCUIT WOULD NEED ------------------------------ A plain 3-bit adder needs exactly the three full adders from this chapter's own circuit - 15 gates - with no mode-select XORs needed at all, since there's only ever one operation to perform. Add an overflow-detection XOR gate (a dedicated adder would likely still want this) for 16 gates total. WHAT A DEDICATED SUBTRACTOR-ONLY CIRCUIT WOULD NEED ------------------------------ A subtractor still needs to negate B somehow before adding it - the XOR-and-carry-in trick is still the natural way to do that (or some equivalent negation circuitry), so a dedicated subtractor would still need essentially the same three full adders (15 gates) PLUS the negation logic (3 XOR gates, now permanently wired to invert rather than switchable) PLUS its own overflow detector (1 gate) - roughly 19 gates on its own, just with the mode-select capability removed rather than any hardware genuinely eliminated. COMBINED TOTAL FOR TWO SEPARATE CIRCUITS ------------------------------ Adder alone: ~16 gates Subtractor alone: ~19 gates Combined (two separate circuits): ~35 gates RESULT ------------------------------ Two separate circuits would need roughly 35 gates combined, nearly DOUBLE this chapter's own single combined circuit's 19 gates - even though each one individually might look like a "simpler, single- purpose" design. The combined circuit's real saving comes from reusing the exact same three full adders for both operations, rather than needing a second full set of adder hardware duplicated inside the subtractor. Building one circuit that does two related jobs, sharing the expensive core hardware (the full adders) between them, is genuinely more gate-efficient than building two separate circuits that each happen to need a nearly identical adder core. WHY THIS WORKS AS AN ANSWER ------------------------------ The gate count for each hypothetical separate circuit is estimated using this chapter's own actual gate-count breakdown as the basis (not invented numbers), and the comparison explicitly identifies WHAT gets shared in the combined design (the three full adders) as the actual source of the savings, rather than just asserting combining circuits is generally more efficient.